public void AddOrder(MarketOrder order) { if (order.IsBid) { BuyOrders.Add(order); } else { SellOrders.Add(order); } }
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(); }
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); }
public TestDbState AddOrder(SellOrder sellOrder) { SellOrders.Add(sellOrder); return(this); }