You would look for the execution of that specific order in OnExecution by matching execution.Order.Name with the Singal Name for that order.
For example, if you use ExitLong(1, "MyExit", "MyEntry"), then you can trap when the order exits in OnExecution by checking if (execution.Order.Name == "MyExit")
You could then set your targetOrder and stopOrder IOrder objects to null.
If you do not specify a signal name, ExitLong will use "Sell" as the order name.
Please let me know if you have any other questions.
Comment