My strategy places a limit order with the following code:
if (entryOrder == null && myCondition)
entryOrder = EnterLongLimit(0,true,NumContracts,orderPrice,myLo ng);
Once the order is filled, entryOrder is set to null.
If I don't like the limit order, and manually cancel the limit from the SuperDOM, the strategy will not place another limit order when myCondition is true. Thinking that my IOrder object is not getting reset to null, I placed the following code in OnOrderUpdate:
if (entryOrder != null && entryOrder == order)
{
if (order.OrderState == OrderState.Cancelled)
entryOrder = null;
}
This still doesn't seem to fix the problem. What can I do to keep the strategy going if I cancel a limit order?
Thanks for your help!

Comment