There is no way to get to the point.
I need to send orders asynchronously, I mean, I can't wait for a reply to be sent, to send another one, because I have more than one order to send at the same time (for two different pairs).
How to send orders asynchronously with MQL4?
Thanks..
you can't
you can't
- Why not? Why are you trading the second pair? It hasn't changed from the last tick. Only the current symbol has.
- In any case, there are no async functions in MT4.
You can simulated it by using several EAs or scripts simultaneously.
in theory, yes..
on live market uncertainties on incoming tick, even 1ms is not asynchronous, or at least not all the time.
One MS?
The microseconds the EA takes is irrelevant, compared to the 20-200 milliseconds the network takes, which is irrelevant compared to the minutes to do a trade because of the servers during news.
OrderSend sends the request, network delivers, placed in the server queue. Once it reaches the top of the queue, you get filled or not, and the result delivered back to the terminal. Normally it is the 20-200 milliseconds the network takes to deliver is the limiting factor, but it can take minutes to do a trade because of the servers during news.
in theory, yes..
on live market uncertainties on incoming tick, even 1ms is not asynchronous, or at least not all the time.
Doesn't make sense.We are talking about sending simultaneous request, not incoming ticks which are irrelevant.
I am not talking about theory but about practice and coding.
in theory, yes..
on live market uncertainties on incoming tick, even 1ms is not asynchronous, or at least not all the time.
asynchronous != batch request. Async is the ability to send other requests without waiting for the result from the trade server, and it can be done by spawning worker EAs that receive order details via custom chart events and process orders. Execution is on par with MT5 async orders as long as you have enough workers in your pool to match the number of trade requests and you don't hit the trade context limit. So it is possible, but it is a hack with a lot of moving parts.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
There is no way to get to the point.
I need to send orders asynchronously, I mean, I can't wait for a reply to be sent, to send another one, because I have more than one order to send at the same time (for two different pairs).
How to send orders asynchronously with MQL4?
Thanks..