Download MetaTrader 5

Total count of open charts

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