if (longEntry != null && longEntry == execution.Order)
{
if (execution.Order.OrderState == OrderState.Filled
|| execution.Order.OrderState == OrderState.PartFilled
|| (execution.Order.OrderState == OrderState.Cancelled && execution.Order.Filled > 0))
{ ... stuff }
The first two if checks I understand - check if the order was filled or partially filled.
But what about the third check? The OrderState of an iExecution Order property can be cancelled and still have it have some type of fill? I'm trying to understand how we can get to this point. We are in OnExecution and to be in this block, longEntry == execution.Order - so how can we have canceled the order and still have it reach this point?
That's my short question - how and why does this happen? If this is really necessary there are probably some other holes in my coding that need plugging. THANKS NINJAS.
Comment