Date / time functions allow you to access the current system date and time, or the date and time of the bar / data point that is currently active. The current bar is the one that the program is executed for at the moment (see also Calculate Values for One Bar - Get Results for All Bars).
All date / time functions return a numeric value. They do not need any input – therefore, you call them with without any brackets.
Day |
Returns the current day of the month. |
Month |
Returns the current month. |
Year |
Returns the current year. |
DayOfWeek |
Returns the current day of the week as a number. |
Minute |
Returns the current minute. |
Second |
Returns the current second. |
YearSecond |
Returns the number of seconds which have elapsed since the beginning of the current year. |
UniqueTime |
Returns the current date and time. |
BarDay |
Returns the day of the month of the current bar. |
BarMonth |
Returns the month of the current bar. |
BarYear |
Returns the year of the current bar. |
BarDayOfWeek |
Returns the day of the week of the current bar as a number. |
BarHour |
Returns the hour of the current bar. |
BarMinute |
Returns the minute of the current bar. |
BarSecond |
Returns the second of the current bar. |
BarYearSecond |
Returns the number of seconds which have elapsed since the beginning of the current year until the current bar. |
BarUniqueTime |
Returns date and time of the current bar. |
This function returns the current day of the month.
Day
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the current month.
Month
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the current year in the format YYYY.
Year
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the current day of the week as a number (Sunday = 0).
DayOfWeek
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the current minute.
Minute
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the current second.
Second
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the number of seconds which have elapsed since the beginning of the current year.
YearSecond
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the current system date and time.
UniqueTime
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the day of the month of the current bar.
BarDay
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the month of the current bar.
BarMonth
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the year of the current bar in the format YYYY.
BarYear
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the day of the week of the current bar as a number (Sunday = 0).
BarDayOfWeek
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the hour of the current bar.
BarHour
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the minute of the current bar.
BarMinute
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the second of the current bar.
BarSecond
Parameters |
|
None |
Returns |
|
Numeric |
This function returns the number of seconds which have elapsed since the beginning of the current year until the current bar.
BarYearSecond
Parameters |
|
None |
Returns |
|
Numeric |
This function returns date and time of the current bar.
BarUniqueTime
Parameters |
|
None |
Returns |
|
Numeric |