|
Constants Reference |
Top Previous Next |
|
Trading Blox Builder contains several built-in constants that can be used in scripts:
Using constants makes your code easier to understand.
The UNDEFINED can be assigned to plotting series, so that the particular series value does not plot.
Contrast this code:
IF instrument.position = 1 THEN
' Do some Long stuff here.
ENDIF
with this code:
IF instrument.position = LONG THEN
' Do some Long stuff here.
ENDIF
In the following code, is it obvious what day we are referring to:
IF DayOfWeek( instrument.date ) = 1 THEN
' Do our weekly tasks here. . ENDIF
How about in this code:
IF DayOfWeek( instrument.date ) = MONDAY THEN
' Do our weekly tasks here. . ENDIF |