コード例 #1
0
        /// <summary>
        /// Copy the message into the <paramref name="destination" />.
        /// </summary>
        /// <param name="destination">The object, to which copied information.</param>
        public void CopyTo(OrderGroupCancelMessage destination)
        {
            base.CopyTo(destination);

            destination.IsStop = IsStop;
            destination.Side   = Side;
        }
コード例 #2
0
ファイル: Extensions.cs プロジェクト: lijielife/StockSharp-1
 /// <summary>
 /// Преобразовать <see cref="OrderGroupCancelMessage"/> в <see cref="ExecutionMessage"/>.
 /// </summary>
 /// <param name="message"><see cref="OrderGroupCancelMessage"/></param>
 /// <returns><see cref="ExecutionMessage"/></returns>
 public static ExecutionMessage ToExecutionMessage(this OrderGroupCancelMessage message)
 {
     return(new ExecutionMessage
     {
         OriginalTransactionId = message.TransactionId,
         ExecutionType = ExecutionTypes.Order,
     });
 }
コード例 #3
0
        /// <summary>
        /// Create a copy of <see cref="OrderGroupCancelMessage"/>.
        /// </summary>
        /// <returns>Copy.</returns>
        public override Message Clone()
        {
            var clone = new OrderGroupCancelMessage();

            CopyTo(clone);

            return(clone);
        }
コード例 #4
0
        /// <summary>
        /// Create a copy of <see cref="OrderGroupCancelMessage"/>.
        /// </summary>
        /// <returns>Copy.</returns>
        public override Message Clone()
        {
            var clone = new OrderGroupCancelMessage
            {
                IsStop = IsStop,
                Side   = Side,
            };

            CopyTo(clone);

            return(clone);
        }
コード例 #5
0
        /// <summary>
        /// Создать копию объекта <see cref="OrderGroupCancelMessage"/>.
        /// </summary>
        /// <returns>Копия.</returns>
        public override Message Clone()
        {
            var clone = new OrderGroupCancelMessage
            {
                LocalTime     = LocalTime,
                SecurityId    = SecurityId,
                IsStop        = IsStop,
                OrderType     = OrderType,
                PortfolioName = PortfolioName,
                //SecurityType = SecurityType,
                Side          = Side,
                TransactionId = TransactionId,
            };

            CopyTo(clone);

            return(clone);
        }
コード例 #6
0
		/// <summary>
		/// Создать копию объекта <see cref="OrderGroupCancelMessage"/>.
		/// </summary>
		/// <returns>Копия.</returns>
		public override Message Clone()
		{
			var clone = new OrderGroupCancelMessage
			{
				LocalTime = LocalTime,
				SecurityId = SecurityId,
				IsStop = IsStop,
				OrderType = OrderType,
				PortfolioName = PortfolioName,
				//SecurityType = SecurityType,
				Side = Side,
				TransactionId = TransactionId,
				ClientCode = ClientCode,
				BrokerCode = BrokerCode,
			};

			CopyTo(clone);

			return clone;
		}
コード例 #7
0
		private void ProcessGroupCancelMessage(OrderGroupCancelMessage groupMsg)
		{
			_client.Session.cancelAllOrders(_accounts[groupMsg.PortfolioName], Constants.ORDER_ENTRY_TYPE_AUTO, string.Empty);
		}
コード例 #8
0
ファイル: InputTranParser.cs プロジェクト: 7630155/StockSharp
        // create and send message
        private void SendCommand(Dictionary<string, object> actions)
        {

            Message message = null;

            switch (actions["ACTION"].ToString())
            {
                case "NEW_ORDER":
                    {
                        message = new OrderRegisterMessage()
                        {
                            SecurityId = _securities.FirstOrDefault(s => s.Code == actions["SECCODE"].ToString() &&
                                                                         s.Class == actions["CLASSCODE"].ToString()).ToSecurityId(),
                            ClientCode = actions["CLIENTCODE"].ToString(),
                            PortfolioName = actions["ACCOUNT"].ToString(),
                            OrderType = (OrderTypes)actions["TYPE"],
                            Price = (decimal)actions["PRICE"],
                            Side = (Sides)actions["OPERATION"],
                            Volume = (decimal)actions["QUANTITY"],
                            TransactionId = _transAdapter.TransactionIdGenerator.GetNextId(),
                            Comment = actions["COMMENT"].ToString()
                        };
                    }
                    break;
                case "KILL_ORDER":
                    {
                        message = new OrderCancelMessage()
                        {
                            OrderId = (long)actions["ORDER_KEY"],
                            OriginalTransactionId = (long)actions["ORIGINAL_TRANS_ID"],
                            TransactionId = _transAdapter.TransactionIdGenerator.GetNextId(),
                        };
                    }
                    break;
                case "KILL_ALL_ORDERS":
                    {
                        message = new OrderGroupCancelMessage()
                        {
                            TransactionId = _transAdapter.TransactionIdGenerator.GetNextId()
                        };
                    }
                    break;
                case "MOVE_ORDERS":
                    {
                        //TODO
                    }
                    break;
                case "REGISTER_SECURITY":
                    {
                        //TODO
                    }
                    break;
                case "UNREGISTER_SECURITY":
                    {
                        //TODO
                    }
                    break;
                case "REGISTER_TRADES":
                    {
                        //TODO
                    }
                    break;
                case "UNREGISTER_TRADES":
                    {
                        //TODO
                    }
                    break;
                case "REGISTER_MARKETDEPTH":
                    {
                        //TODO
                    }
                    break;
                case "UNREGISTER_MARKETDEPTH":
                    {
                        //TODO
                    }
                    break;

                default:
                    break;
            }

            if (message != null)
                _transAdapter.SendInMessage(message);
        }