public void OnOrderUpdate(NinjaTrader.Cbi.Order order) { if (iorder == null) { return; } if (order.OrderId != iorder.OrderId) { return; } if (order.OrderState == OrderState.Rejected) { if (strategybase.TraceOrders) { strategybase.Print(order.Name + ":Order.Rejected"); } } if (order.OrderState == OrderState.Cancelled) { if (strategybase.TraceOrders) { strategybase.Print(order.Name + ": Order Cancelled"); if (checkinflight) { strategybase.Print(order.Name + ": checkinflight end"); } } checkinflight = false; iorder = null; } }
public void Zero() { if (strategybase.TraceOrders) { string tmp = ""; if (iorder != null) { tmp += iorder.Name + ":"; } tmp += "iorder==null"; strategybase.Print(tmp); } iorder = null; checkinflight = false; }