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
it takes up to 4 (FOUR!) seconds until ChartGetDouble() returns.
Try this.
Why?
Why?
The program will access its chart directly, rather than through the general queue.
Try this.
The program will access its chart directly, rather than through the general queue.
Where is this coming from ? Do you have a link please ?
If it doesn't wait for the queue to be executed that means you could get wrong values.
Where is this coming from ? Do you have a link please ?
https://www.mql5.com/ru/forum/342090/page50#comment_18647629
https://www.mql5.com/ru/forum/383101/page5#comment_26356569
I seem to have forgotten a bit. It was about creating your own events for the chart.
This issue is still not fixed.
Especially number 2 - I need to check if the max price of the chart changed, which happens, when the scale is not fixed and the new candles would exceed the the current chart display, in such a case, the chart is changed - but no event occurs.
This measurement, which is clearly needed to catch all chart changes, slows down the EA drastically. I do this checking within the timer. I simply buffer the last Max-Price and compare it to the new one, by using ChartGetDouble(). My profiling shows horrible results and this explains stuttering execution.
As shown, it takes up to 4 (FOUR!) seconds until ChartGetDouble() returns. The profiling shows only values which exceed 1ms.
What is the point of code optimization when bottlenecks like such remain since years ... I don´t get it.
This is a Windows issue on slow computer (or VPS Windows Servers who are not optimized for the GUI). MT5 is relying on Windows events queue for such function call and it can be very slow (in seconds).
ChartEvent has been improved for the Max/Min changes. Available from build >=5880.
2026.06.01 11:48:21.351 EA (EURUSD,H1) CHANGE DETECTED on CHART_PRICE_MAX 1.1859
2026.06.01 11:48:21.351 EA (EURUSD,H1) CHANGE DETECTED on CHART_PRICE_MIN 1.1396