Download MetaTrader 5

Count number of bars on the current chart

To add comments, please log in or register
Log in to MQL5.community using OpenID. It is convenient!
Eric Pedron
241
Eric Pedron 2010.08.25 13:22 

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
Vladimir Batrudinov
4926
Vladimir Batrudinov 2010.08.25 13:55  
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);

Eric Pedron
241
Eric Pedron 2010.08.25 14:37  
Interesting:

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

Example

Got it .. thanks
To add comments, please log in or register