First of all, thank you very much for reading the post. Currently, I am using a LimitOrder to enter a long position in order to close it with a StopOrder when certain conditions are met, the problem I present is that it is possible that two StopOrders meet the condition and not only close the long position but also It is already short, how is it possible that only one of them is executed and the long position is closed only. I am using the UpdateOrderFields so as not to generate multiple orders. Is that the best way to simulate Stop-Limit-Orders? I am simulating how to exit the market with the execution of another order and re-enter with another condition and so on, without entering short positions.

Best regards,

Julio