The SampleOnOrderUpdate code example contains the following code fragment:
// Resets the entryOrder object to null after the order has been filled
// or partially filled
if (execution.Order.OrderState != OrderState.PartFilled)
{
entryOrder = null;
}
Is this fragment correct?
Shouldn't it be ....
// Resets the entryOrder object to null after the order has been filled
// or partially filled
if (execution.Order.OrderState == OrderState.Filled
|| execution.Order.OrderState == OrderState.PartFilled)
{
entryOrder = null;
}

Comment