Is it possible when evaluating a logic block, an order can be in pending cancel at the begining of the evaluation and then in cancelled staus when evaluating rest of the logic.
Suppose under OnBarUpdate
if (order1 !=null && order1.Filled ==0)
{
CancelOrder(order1);
}
Under OnOrderUpdate, order1 is set to null if cancelled.
Is it possible that when evaluating order1!= null the order staus is pendingcancel, while when evaluating order1.Filled ==0 it is cancelled?
Comment