Download MetaTrader 5

Total count of open charts

To add comments, please log in or register
sdoppke
71
sdoppke 2015.09.22 01:00 
Would someone help me with some code to return total open chart count?
Zirkon
122
Zirkon 2015.09.22 11:55  
   int count=0;
   long chartid=ChartFirst();
   
   do
     {
      chartid=ChartNext(chartid);
      count++;
     }
   while(chartid!=-1);
whroeder1
14741
whroeder1 2015.09.22 13:16  
int count=0;
for(long chartid=ChartFirst(); chartid != -1; chartid=ChartNext(chartid) ) count++;
sdoppke
71
sdoppke 2015.09.22 16:33  
I really appreciate both of you, this helped immensely. 
To add comments, please log in or register