Imagine that I have a Buy limit order in "working state", then strategy conditions ask to change that buy limit order into a buy market order, so here a little snippet to show:
if ( pv0>0 ) { CancelOrder(lEntryOrder); while (lEntryOrder != null) { } lEntryOrder = SubmitOrder(0, OrderAction.Buy, OrderType.Market, (qty+Position.Quantity), 0, 0, "", "LONG"); }
So my doubt:
I imagine that market, brokers, network or hardware conditions might delay or interrup a fast cancellation, so I thought that doing a previous Null check is necessary. Your Thoughts by experience ?
Thanks in advance
Comment