Count number of bars on the current chart

 

Hello,

    Is there a function that counts the number of bars that is being shown on the current chart? Thank you. 

Documentation on MQL5: Timeseries and Indicators Access / Bars
  • www.mql5.com
Timeseries and Indicators Access / Bars - Documentation on MQL5
 
DojiSan:

Hello,

Is there a function that counts the number of bars that is being shown on the current chart? Thank you. 

Try to use these functions: ChartSetInteger() and ChartGetInteger().

Example

long  ChartBarsCount = ChartGetInteger(Chart_ID,CHART_VISIBLE_BARS);

 
Interesting:

Try to use these functions: ChartSetInteger() and ChartGetInteger().

Example

Got it .. thanks
Reason: