NumBars

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

NumTicks

Total number of ticks processed in the simulation, determined from the price history resolution. Is 0 in the initial run before the first asset call.

Bar

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

StartBar

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

EndBar

Number of the last bar.

AssetFirstBar

Number of the first valid bar of the selected asset. Can be different for asset whose histories begin later than the initial bar. 

Day

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.

Type:

int, read/only

Remarks:

Example:

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

See also:

Bars, BarPeriod, BarOffset, LookBack, StartDate, run

 

► latest version online