getCurrentBarIndex() |
Top Previous Next |
getCurrentBarIndex()
Returns the current offset into the price series that is loaded in the chart.
Parameters
Usage
function main() { var nBarIndex;
... ...
nBarIndex = getCurrentBarIndex(); if ( nBarIndex < 0 ) { //we are currently on a historical bar } else if ( nBarIndex == 0 ) { //we are on the most current bar }
}
|