Just works as it should. The point is to print if a character has changed!
Suddenly.
long currChart=0,prevChart=ChartFirst();
int i=0,limit=100;
staticlong CurrID;
while(i<limit) { // у нас наверняка не больше 100 открытых графиков
currChart=ChartNext(prevChart); // на основании предыдущего получим новый графикif(ChartGetInteger(prevChart,CHART_BRING_TO_TOP)) break;// нашли нужный график - выходif(currChart<0) break; // достигли конца списка графиков
prevChart=currChart;// запомним идентификатор текущего графика для ChartNext()
i++;// не забудем увеличить счетчик
}
if(CurrID!=currChart) {
Print(ChartSymbol(prevChart));
CurrID=currChart;
}
MakarFX: I have not mentioned the Expert Advisor, and it does not matter what function is running in OnTimer()
Use a function with the break construct ; I hope I don't need to tell you the advantage of this approach ... Today there are 3 charts and tomorrow there may be 23.
I would also add a control of the minimized terminal, so as not to spin the loop unnecessarily.
Use a function with the break construct ; I hope I don't need to tell you the advantage of this approach ... Today there are 3 charts and tomorrow there may be 23.
I would also add a control of the minimized terminal, so as not to spin the loop unnecessarily.
Thank you, but how do you define a minimised terminal?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
It works, thank you.
Misses the first chart window.
Just works as it should. The point is to print if a character changes!
Well, if you don't need to keep track of a chart change, that's another matter.
It works, thank you.
Misses the first chart window.
Just works as it should. The point is to print if a character has changed!
Suddenly.
The point of the function is that I run the EA on one chart and it already tracks my actions on the active chart.
Told me it was an indicator and told Vitaly it was an advisor... )))))))))))))
Told me it was an indicator and told Vitaly it was an advisor... )))))))))))))
I have not mentioned the Expert Advisor, and it does not matter what function is running in OnTimer()
Use a function with the break construct ; I hope I don't need to tell you the advantage of this approach ... Today there are 3 charts and tomorrow there may be 23.
I would also add a control of the minimized terminal, so as not to spin the loop unnecessarily.
Use a function with the break construct ; I hope I don't need to tell you the advantage of this approach ... Today there are 3 charts and tomorrow there may be 23.
I would also add a control of the minimized terminal, so as not to spin the loop unnecessarily.
I didn't say anything about EA, and it doesn't matter the function works in OnTimer()
Of course it doesn't matter. There are no smiley faces, hence the brackets at the end of the sentence...)))))
Tell me where you can download the MT4 terminal version 1320
https://www.mql5.com/ru/forum/318974#comment_12650248