USERDEFINEDRISK

Top  Previous  Next

Keyword Description

Custom definition of risk

Class

Directive

Where Legal

Resources

Entry Logic

Exit Logic

Initial Size

Resize

(Pre-Category)

Resize

(Category-Level)

l

l

l

 

 

 

Syntax

USERDEFINEDRISK

 

Example

Sample code

COL2 = ATR[15] * POINTVALUE ' pointvalue can change daily in forex markets

USERDEFINEDRISK = COL2[1]   ' use $ volatility to define risk

 

ThumbTack white

This keyword does not include slippage and commission.

1. Assigning a value to USERDEFINEDRISK is a SIG operation, but the value you assign is later used in Sizing operations.

2. After assigning a value to USERDEFINEDRISK in SIG code, the keyword is never explicitly used in Sizing statements, because...

3. The value you assigned to the keyword USERDEFINEDRISK flows through to all keywords containing the RISK suffix. This includes not only initial sizing keywords —including NEWRISK—but resizing keywords as well.

See also:

NEWRISK, SECTORISK