Time/date parameters

StartDate

Start of the simulation. The start can be determined in two different ways. A 4-digit number (f.i. 2006) determines the year number of the historical data file with which the simulation starts (f.i. EURUSD_2006.t6). If the file has no year number (f.i. MSFT.t6), the simulation starts with the start of the file. A date in the 8-digit yyyymmdd format starts the backtest at a certain date (f.i. 20090401 = April 1st, 2009). In the latter case the simulation period can begin earlier as the LookBack period is added in front of the date. Therefore, StartDate = 2006 starts the backtest normally at a later date than StartDate = 20060101. If at 0 (default), the simulation starts with the file year number given by NumYears before the current year.

EndDate

End of the simulation, either 4 digits for determining the year number of the last historical price data file (similar to StartDate), or a date in yyyymmdd format for ending the backtest at that date (f.i. 20091231 = December 31, 2009). If at 0 (default), or if the file has no year number, the simulation runs until the end of the available price history.

NumYears

Number of years of the simulation if no StartDate or EndDate is given (default: 6 years). The current year counts as one full year. Set NumYears to -1 for not loading any prices.

MaxBars

Maximum number of bars of the simulation (default: 0 = no limit). The simulation ends either at EndDate or after the given number of bars (including the LookBack period), whichever happens earlier.
 

UpdateDays

Interval in days for automatically downloading new price data and adding it to the price history file (default: 0 = don't download new price data). If the price history is older than the given number of days, the download process starts automatically at the begin of a [Test] or [Train] cycle. Set UpdateDays to -1 for always loading all prices up to the current time.

ReTrainDays

Interval in days for automatically retraining a live trading system (Zorro S required; default: 0 = no automatic retraining). Set this to the duration of the WFO test period for keeping a WFO trained system in sync with the market.

GapDays

Maximum allowed gap in days in the historic prices and in the downloaded price data (default: 0 = no gap checking). Set this to 2 or above in order to check the price curve for gaps and inconsistencies, and give an Error 047 message if any are detected. Weekends and international holidays are except from gap checking. Gaps of 1 day are normal in historic prices due to national holidays.
 

StartWeek

Start of the business week in dhhmm UTC format, where d = day number (1 = Monday .. 7 = Sunday), hh = hour and mm = minute. Default: 72300 (Sunday 23:00 UTC). Used to determine the WeekEnd behavior. If required, set this variable to the local market opening time converted to UTC. Consider daylight saving (dst function).

EndWeek

End of the business week in dhhmm UTC format. Default: 52000 (Friday 20:00 UTC). Used to determine the WeekEnd behavior. If required, set this variable to the local market closing time converted to UTC. Friday 20:00 UTC is equivalent to 15:00 ET without daylight saving and to 16:00 ET with daylight saving.

StartMarket

Daily market opening time in hhmm local time format, hh = hour and mm = minute. Default: 930. Used for the day and market functions.

EndMarket

Daily market closing time in hhmm local time format, hh = hour and mm = minute. Default: 1600. Used for the day and market functions.

Type:

int
 

Now

Date/time in Windows DATE format for the date/time functions with NOW argument. When at 0 (default), the current PC date and time is used.

Type:

var
 

Remarks:

Example:

StartDate = 20050901; // start the simulation with September 2005
EndDate = 20050930; // and simulate one month.

See also:

bar, BarPeriod, LookBack, Detrend, time/date functions, PlotDate

 

► latest version online