protected override void OnOrderUpdate(IOrder order)
{
if (order.OrderState = = OrderState.PendingSumbit)
{
orderbook.Add(order)
}
if (order.OrderState == OrderState.Cancelled || order.OrderState == OrderState.Filled || order.OrderState == OrderState.Rejected)
{
orderbook.Remove(order)
}
}
Therefore I can query the orderbook to find those pending order and trying to modify it. However, there is a question. Suppose I stop the strategy which already place an stop order in the broker, what will happen to the orderbook if I restart the strategy? As the time the strategy just before live, those orders are handled by NT7 internally. Will the order state and info about the order will be reflected once it turns into live order? Will the orderbook syn during switch from sim to live?
Thanks!
Comment