Support

Equilla Formula Language

TotalBars

Returns the total number of bars.

Remarks

The total number of bars may be less than the maximum number of bars specified for a chart, however it can not exceed this value. If a new bar is generated and the maximum number of bars is exceeded, the oldest bar is dropped. This means the total number of bars remain constant after the maximum has been reached. You may use the FirstBar function, to determine the number of the first, or the LastBar function to determine the number of the last bar available for calculations.

Examples

Write the number of the first bar, the number of the last bar and the total number of bars to the output window
If IsLastBar Then Print( "The firstbar is " + CStr( FirstBar ) + ", the last bar is " + CStr( LastBar ) + ", the total number of bar is " + CStr( TotalBars ) );