Equilla Formula Language


Returns the bar number of the first bar of an instrument.


When a script is added to a chart, the first bar gets the number one. When a new bar is generated and the maximum number of bars for the chart is exceeded, the oldest bar will be dropped and the second oldest becomes the first bar.


Write the number, the date and the time of the oldest available bar to the output window
If IsLastBar Then Print( "The number of the firstbar is " + CStr( FirstBar ) + ", the timestamp is " + CStr( DateTime[ CurrentBar - FirstBar ] ) );