(MQL4) How to send multiple orders simultaneously?

 

In order to send multiple orders simultaneously, it's needed to work outside of the EA. Can this be done by using a library or script? 

Within the EA you need to wait for the result of the OrderSend() function. For my project it is needed to use the OrderSend() function without waiting for it's result so that multiple orders can be send at the exact same time. 

 
Line_Trader:

In order to send multiple orders simultaneously, it's needed to work outside of the EA. Can this be done by using a library or script? 

Within the EA you need to wait for the result of the OrderSend() function. For my project it is needed to use the OrderSend() function without waiting for it's result so that multiple orders can be send at the exact same time. 

You can't. MT4 provides only one single trade context. While one order is being sended, the context is busy and all pending orders should wait until it's free again.
 
You can't, but you can place orders sequentially with script without waiting long time (within milisecond perhaps).
 
Stanislav Korotky:
You can't. MT4 provides only one single trade context. While one order is being sended, the context is busy and all pending orders should wait until it's free again.

That's not exact. MT4 can manage up to 16 trading requests.

 
Line_Trader:

In order to send multiple orders simultaneously, it's needed to work outside of the EA. Can this be done by using a library or script? 

Within the EA you need to wait for the result of the OrderSend() function. For my project it is needed to use the OrderSend() function without waiting for it's result so that multiple orders can be send at the exact same time. 

It's not possible with 1 EA, as OrderSend() is synchronous.

It's possible to send multiple orders (up to 12 simultaneously) with multiple EAs, not a trivial task though.

 
Alain Verleyen:

That's not exact. MT4 can manage up to 16 trading requests.

Ah, the joys of MetaQuotes documentation. The answer is to be found in... *drum roll please* ... a Russian forum post 

 
honest_knave:

Ah, the joys of MetaQuotes documentation. The answer is to be found in... *drum roll please* ... a Russian forum post 

That's a long time I am considering the Russian forum as an extension of the documentation 
Reason: