Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 985
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good afternoon.
Please help. When writing a custom function, the tester gives error 3 and does not open orders. Please specify the errors.
Strange, if in one EA, it opens trades one after the other for each specified currency pair... With a time lag. And when you put it on 5 different charts with different currency pair (symbol(0)), all 5 trades open simultaneously and instantly when you press autotrade.
Can you suggest what it may be and how to fix it? To have everything in one EA and on one chart (so that the button on the chart opens all pairs as fast as when activating "autotrade" with several EAs, as in the original version)
here in general is the problem.... you and i are doing our best to suspend the terminal, imho.... i don't like wrong logic to write, here i have done as you want - threw the EA on the chart, pressed the button and it will try to open an order in an endless loop
here in general is the problem.... you and i are doing our best to suspend the terminal, imho.... i don't like to write the wrong logic, here i have done as you want - throw the EA on the chart, press the button and it will try to open an order in an endless loop
Igor, thanks for the extended functionality! Unfortunately, nothing has changed in terms of speed. My trades are also opening one after another. I tried again to put minimal version on each chart and pressed "autotrade", all deals opened at once and instantly. There is still a slight delay at the beginning.
Despite this, still when you click on the integrated Trade Panel button, a single trade opens even faster, without an initial delay. Weird. We would like to get to a state where a similar button would open a basket without delay.
As far as the execution speed is concerned:
1. The fastest way is to poke the standard Trade Panel.
2. Scatter it over several charts and press "AutoTrade".
3. The button that opens the basket one by one
The trades are also opened one after the other.
There is no other way, google information on Market Execution/Instant Execution account types
and second pointhttps://www.mql5.com/ru/docs/runtime/running
Expert Advisor - In its own thread, as many EAs as there are execution threads for them
in brief - after an EA sends an order it waits for an order to be confirmed and if there are several EAs on different charts, you get the independence of each EA, i.e. multi-threaded execution of code
I think for your problem, as far as I understand trading the news, the best solution is to open several charts, throw the EAs configured on them, which are looped in an infinite loop and, after placing an order the EA has to leave the chart, start all EAs with the Autotrade button
Hi all! How to make the standard Parabolic indicator in an EA to open a trader on the creation of its first point (i.e. market trend change) ????
At first, the points to which the arrows point were on the opposite side of the current price. And as soon as the price touched that point, it immediately jumped to the other side.
Conclusion: The first point on top will be when the price touches the point on the bottom. And vice versa...
There is no other way, google information on Market Execution/Instant Execution account types
And the second point ishttps://www.mql5.com/ru/docs/runtime/running
In a nutshell, when you send an order the EA waits for an order to be confirmed and if there are a few EAs on different charts, you will get an independent working of each EA, i.e. a multi-threaded execution of the code
I think for your problem, as far as I understand trading the news, the best solution is to open several charts, throw the EAs configured on them, which are looped in an infinite loop and, after placing an order, the EA should leave the chart and start all EAs using the auto-trade button
Wow... thanks for the clarification. I mean. Indeed, only after opening the current one does the next one open. Curious.
Do you know by any chance if you try the fourth scheme - trade copier - the trades will also open sequentially? For example, we give a signal to the copyer that 7 orders seem to be open on the wizard... how will he open them? Or, we should also set up 7 copyers and indicate to each of them to copy their pair. Although, I may try it, I don't have to create anything additionally.
There is also a fifth method - use the clicker. But, it is too expensive, I don't think anyone will write it at the moment. I will try what is available for now.
UPDI tried copier - same thing, deals opens sequentially. And if I put the copier on 7 charts and set 1ms update, the terminal together with UPD will explode.
That leaves two ways.
1. The active one - to place the Expert Advisor on each chart and enable auto-trading.
2) The unproven - to use third-party software - clicker.
1. Actionable - put an EA on each chart and enable auto-trading.
2. Unproven - use third-party software - clicker.with 99% probability 1 and 2 will work the same speed, the server is still processing your trade requests one by one, and when you send 7 requests from 7 charts, you have won time waiting for answer from server (until the EA receives the ticket, it does nothing - it is waiting)
about the clicker, with WinAPI you can "click" with your mouse on any point of the screen, I checked the code a month agohttps://www.mql5.com/ru/forum/156025#comment_7552799
You want to use auto clicker to send an order, so you can do the same with@Koldun Zloy's code
with 99% probability option 1 and 2 will work the same speed, the server is still processing your trade requests one by one, and when you send 7 requests from 7 charts, you have won time waiting for the response from the server (until the EA receives the ticket, it does nothing - it waits)
about the clicker, with WinAPI you can "click" with your mouse on any point of the screen, I checked the code a month agohttps://www.mql5.com/ru/forum/156025#comment_7552799
You want to use auto clicker to send an order, so you can do the same with @Koldun Zloy's code
Great, I'll check it out. Thank you very much for your help and the work you have done
Hello.
I am mastering MT5. But it's not clear how to draw the buffer lines. I downloaded indicator from mql5 site and fixed it a little.
But now I have some problems with lines. My question is: Why is the line skewed in history and how to fix it?