Download MetaTrader 5
To add comments, please log in or register
Have you discovered something really important? Write an article and receive 200 USD!
Jon Grah
367
Jon Grah 2014.08.02 02:38 

i'm using build 670.  Say I have 5 separate tickets of eurusd filled.  Can I initiate a 'closeAll' where I send 5 requests to close the orders such that I can send one request without having to wait for the previous request to report back?  In looking at the journal, it looks like I must wait until one request is completed its cycle before a new one can be made :(

 Or send one request to close all 5 ticket numbers? 

Alain Verleyen
Moderator
29609
Alain Verleyen 2014.08.02 06:47  
4evermaat:

i'm using build 670.  Say I have 5 separate tickets of eurusd filled.  Can I initiate a 'closeAll' where I send 5 requests to close the orders such that I can send one request without having to wait for the previous request to report back?  In looking at the journal, it looks like I must wait until one request is completed its cycle before a new one can be made :(

 Or send one request to close all 5 ticket numbers? 

No you can't. There is only synchronous request with MT4/mql4.
Drazen Penic
2439
Drazen Penic 2014.08.02 07:49  

Fastest way to close is to set S/L and T/P in advance, because setting those levels is also sequential and takes some time.

When price hits one of the levels, orders will be closed on the server and it will happen faster then if you close them from your EA.

/
To add comments, please log in or register