Documentation / Date and time

Return the number of the day in the week. Monday is “1”, Tuesday “2”, etc.

Syntax:

CurrentDayOfWeek

 

Example:

//Testing if today is Wednesday

IF (CurrentDayOfWeek = 3) THEN
     Wednesday = 1
  ELSE
     Wednesday = 0
ENDIF

RETURN Wednesday

 

Return the current hour in 24h format.

Syntax:

CurrentHour

 

Example:

//Testing if it's time to lunch

IF (CurrentHour = 12) THEN
     GoLunch = 1
  ELSE
     GoLunch = 0
ENDIF

RETURN GoLunch

 

Return the month number.

Syntax:

CurrentMonth

 

Example:

IF (CurrentMonth = 10) THEN
      HalloweenMonth = 1
  ELSE
      HalloweenMonth = 0   
ENDIF

RETURN HalloweenMonth

 

Return the current second number.

Syntax:

CurrentSecond

 

Get the current time in HHMMSS format.

Syntax:

CurrentTime

 

Example:

//Testing if it's time to wake up !

IF (CurrentTime = 073000) THEN
     WakeUp = 1
  ELSE
     WakeUp = 0
ENDIF

RETURN WakeUp

 

Return the current year number.

Syntax:

CurrentYear

Reports the date of the selected N bar of the current chart in YYYYMMDD format.

Syntax:

Date[N]

 

Reports the day of the selected N bar of the current chart in DD format.

Syntax:

Day[N]

Give you the day of the week of the N selected bar of the current chart.

Syntax:

DayOfWeek[N]

Reports number of days elapsed since year 1900 at selected N bar of the current chart.

Syntax:

Days[N]

Top