Total number of bars in the simulation, determined from Lookback, StartDate and EndDate and from the available data in the price history files. Is 0 in the initial run before the first asset call.


Current bar number including the lookback period and preceding history, usually from 0 to NumBars-1. The number is not always counted up straight since bars can be skipped (see remarks).


Number of the first bar after the lookback period. (Bar-StartBar) is the current length of the test period in bars. (StartBar-LookBack) is the number of the first bar after the INITRUN.


Current trading day number of the simulation, starting with the end of the lookback period. Periods with no bars, such as weekends and holidays, are skipped.


int, normally read/only



printf("\nBar %i of %i",Bar,NumBars);

See also:

Bars, BarPeriod, BarOffset, LookBack, StartDate, run


► latest version online