Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1420

 
MakarFX:

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.

 
MakarFX:

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.

   long currChart=0,prevChart=ChartFirst();
   int i=0,limit=100;
   static long 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;
   }
 
The essence of the function is that I run the EA on one chart and it already tracks my actions on the active chart.
 
MakarFX:
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... )))))))))))))

 
Alexey Viktorov:

Told me it was an indicator and told Vitaly it was an advisor... )))))))))))))

I didn't say advisor, and never mind the function works in OnTimer()
 
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.

 
Vitaly Muzichenko:

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?
 
MakarFX:
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 version of MT4 1320
 
viktor:
Tell me where you can download the MT4 terminal version 1320

https://www.mql5.com/ru/forum/318974#comment_12650248

При скачивании мт4, скачивается мт5 !!!
При скачивании мт4, скачивается мт5 !!!
  • 2019.07.30
  • www.mql5.com
На сайте www.mql5.com при скачивании мт4, скачивается мт5 !!! Подскажите как скачать мт4...
Reason: