Allows backtests to not update their initial capital with gains and losses (instruction for backtests only).
Syntax:
1 |
DEFPARAM NOCASHUPDATE=true/false |
Allows backtests to not update their initial capital with gains and losses (instruction for backtests only).
Syntax:
1 |
DEFPARAM NOCASHUPDATE=true/false |
Logicial operator NOT.
Syntax:
1 |
NOT |
Example:
1 2 3 4 5 6 7 8 9 10 11 |
result = 0 FOR i=0 TO 20 DO a = Close[i+10] b = Close[i] if not (a > b) THEN result = 1 ENDIF NEXT RETURN result |
Return the On balance volume indicator value of the selected price.
Syntax:
1 |
OBV(price) |
Example:
1 2 3 4 5 6 |
i1 = OBV(close) i2 = OBV(close[10]) test = i1-i2 RETURN test |
Introduces a definition statement which will be processed only once.
Syntax:
1 |
ONCE |
Example:
1 2 3 4 5 6 7 8 9 |
ONCE myfirstlowest = lowest[10](low) IF(low < myfirstlowest OR low < recentlow) THEN recentlow = low ELSE recentlow = recentlow ENDIF RETURN recentlow |
Indicates whether or not a position is open.
Syntax:
1 |
ONMARKET |
Example :
1 2 3 |
IF NOT ONMARKET THEN BUY 1 CONTRACTS AT MARKET ENDIF |
Opening price constant of the current bar or of the Nth last bar.
Syntax:
1 |
Open[N] |
Example:
1 2 3 4 5 |
//Open of the current bar Open[0] or Open //Open of the 20th previous bar from current close Open[20] |
Date of the open of the current bar in the format YYYYMMDD.
Syntax:
1 |
OpenDate |
Day of the open of the current bar.
Syntax:
1 |
OpenDay |
Day of week of the open of the current bar.
Syntax:
1 |
OpenDayOfWeek |
Opening hour of the current bar in the user’s time zone.
Syntax:
1 |
OpenHour |