コード例 #1
0
 public void AddOrder(MarketOrder order)
 {
     if (order.IsBid)
     {
         BuyOrders.Add(order);
     }
     else
     {
         SellOrders.Add(order);
     }
 }
コード例 #2
0
 private void AddOrder(Order newOrder)
 {
     if (newOrder.Action == ActionEnum.BUY)
     {
         BuyOrders.Add(newOrder);
     }
     else if (newOrder.Action == ActionEnum.SELL)
     {
         SellOrders.Add(newOrder);
     }
     else
     {
         throw new SmartException(ExceptionImportanceLevel.HIGH, "AddOrder", "StrategyState", "No other options. New Order = " + newOrder.ToString());
     }
     MakeConsistent();
 }
コード例 #3
0
        public void AddOrder(ILimitOrder order)
        {
            if (order.Price != Price)
            {
                return;
            }

            switch (order.Way)
            {
            case WayEnum.Buy:
                BuyOrders.Add(order);
                break;

            case WayEnum.Sell:
                SellOrders.Add(order);
                break;
            }

            order.RegisterDeleteNotificationHandler(HandleDeleteOrFilled);
            order.RegisterFilledNotification(HandleDeleteOrFilled);
        }
コード例 #4
0
 public TestDbState AddOrder(SellOrder sellOrder)
 {
     SellOrders.Add(sellOrder);
     return(this);
 }