I think this is what OP is trying to avoid since this is an example of synchronous operation... In this example; order#1 is sent to the broker-server and the function waits for a result. Only after confirmation of order#1 and checking the trade context can it proceed to place order#2, which could take seconds.
Yes, the problem is to avoid waiting for reply of the OrderSend function ...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I think this is what OP is trying to avoid since this is an example of synchronous operation... In this example; order#1 is sent to the broker-server and the function waits for a result. Only after confirmation of order#1 and checking the trade context can it proceed to place order#2, which could take seconds.