The following two questions are related to how NT cancels orders that are associated with the same signal name.
In SampleOnOrderUpdate, both stopOrder and targetOrder are reset to "null" if either stop or target order is filled. This is done in OnExecution.
My understanding is: when targetOrder is filled, the internal logic will cancel the working stopOrder. When resetting "null" to both stopOrder and targetOrder, how does the strategy find the still working stopOrder for the cancellation?
May be the cencel request is sent after OnOrderUpdate but before OnExecution. But I am not sure that is the case.
The above question is related to the follwoing situation. In OnOrderUpdate, I use a market order to exit a position once its stopOrder is cancelled.
If NT sends out stopOrder cancel request due to targetOrder fill after OnExecution, then I speculate my market order to exit a position in OnOrderUpdate will not get triggered, because stopOrder is already reset to null. However, if NT sends out cancel request prior to OnExecution, then stopOrder will not be null. Will I end up an open position post targetOrder fill?
Regards,
Comment