What is the index of the last left bar visible?

 

Hi, I trying to get the index of the last left bar visible in the chart... or the total amount of visible bars.

The following code does not work: 

Bars(_Symbol, _Period)

because it tells the total number of bars in history which is greater than the amount of bars visible.

 
douglas14:

Hi, I trying to get the index of the last left bar visible in the chart... or the total amount of visible bars.

The following code does not work: 

Bars(_Symbol, _Period)

because it tells the total number of bars in history which is greater than the amount of bars visible.

Sorry guys, already found the solution.. I used:

ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR,0)