RealTest User Guide
RealTest User Guide

 

 

Navigation: Realtest Script Language >

Date Constants

 

 

 

 

Date constants in scripts or input files can be formatted in any of the following ways:

m/d/yy (or d/m/yy if DateInput setting is DMY)

m/d/yyyy (or d/m/yyyy likewise)

any of the above with dashes (-) or dots (.) instead of the slashes (/)

yyyy/mm/dd

yyyy-mm-dd

yyyy.mm.dd

yyyymmdd

dd-mmm-yy (where mmm is the first three letters of the month name)

dd-mmm-yyyy (ditto)

Earliest (use the earliest available date as a StartDate)

Latest (use the latest available date as an EndDate)

Date constants are used in the Import and Settings script sections.

The DateInput setting determines whether x/x/y is interpreted as d/m/y vs. m/d/y.

To override the current DateInput setting for a CSV import and/or EventListFile, add a CSVDateFmt definition.

To override the current DateInput setting for a strategy's imported TradeList, add a TLDateFmt definition.

To specify a literal date within a formula, e.g. EntrySetup: BarDate > 20240101 and other_conditions, if(Date = 20200607), it must be formatted as YYYYMMDD as in this example.

To parse a date string within a formula, use the ToDate function.

To format a numeric date in a non-default way, use the FormatDate function.

To control how dates are displayed by default in the user interface or output files, use the DateDisplay setting.

 

 

 

 

 

Copyright © 2020-2025 Systematic Solutions, LLC