// Resets the entryOrder object to null after the order has been filled or partially filled
if (execution.Order.OrderState != OrderState.PartFilled)
{
entryOrder = null;
}
It is taken from SampleOnOrderUpdate strategy, and is confusing. I believe the "or partially filled" does not apply.
If the order is partially filled, then it should never enter into the if statement. If a "partially filled" order sets the entryOrder variable to null in the if statement, then you will no longer have a reference to the order object to set the stops and targets for the part of the order that must still be filled.
Please clarify. thanks.

Comment