Ha-yun: I'm looking for a way to do this faster.
What part of “immediately” was unclear to you?
I've tried using ChartRedraw() and it doesn't fulfill a function "immediately".
Are there alternatives to make this quick switch between charts?
Below is my function to change graph:
if(!ChartSetInteger(chart_ID,CHART_BRING_TO_TOP,0,true)) { MessageBox("Failed to change chart, error " + GetLastError(), "Failed to change chart", MB_OK); return(false); } ChartRedraw();

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
Hello, I read the documentation about CHART_BRING_TO_TOP, and there it says the following:
The function is asynchronous, that is, it does not wait for the command to be successfully queued for the specified chart to execute, instead it returns control immediately. The property will only change after processing the command in the chart queue.
To immediately execute commands in the schedule queue, you need to call the ChartRedraw function (MQL5)
However, for my case this function runs randomly, sometimes in 0.5 seconds, other times 3.4 seconds.
I'm looking for a way to do this faster.
Update #1
Below is my function to change graph: