EasyLanguage Reserved Words & Functions
References the DateTime object properties for a specific bar.
BarDateTime[BarsAgo].FieldName
BarsAgo is an optional parameter. If BarsAgo is 0, the current bar is referenced; if BarsAgo is 1, the prior bar is referenced.
FieldName can be any property or method of the DateTime class, such as ELDate or Second.
To access date time properties for a bar in a data stream other than Data 1 add the words as DataN as follows:
BarDateTime[BarsAgo] as DataN.FieldName
DataN is an optional parameter that allows you to reference values from multi-data charts and can be a value from Data1 to Data50.
The BarDateTime reserved word allows you to reference the current date and time properties of the bar, including seconds. Refer to the DateTime class for more information about the properties available.
The following print statement displays the EasyLanguage date and time properties values along with the hour, minute, and second properties for the current bar.
Print(
BarDateTime.ELDate:4:0, " ",
BarDateTime.ELDateTimeEx, " ",
BarDateTime.ELTime:4:0, " ",
BarDateTime.Hour:4:0, " ",
BarDateTime.Minute:4:0, " ",
BarDateTime.Second:4:0, " " ) ;