Primitives
timeExit
Exits a position after a specified time period has elapsed. This helps manage risk by ensuring positions don't stay open longer than intended.
timeExit (position)
Exits a position after a specified time period has elapsed. This helps manage risk by ensuring positions don't stay open longer than intended.
Input parameters
| Prop | Type | Default | Description |
|---|---|---|---|
seconds* | number | The number of seconds to hold the position before exiting | |
transmit | boolean | false | Whether to transmit the exit order |
SQL example
IF timeExit seconds=1800
POS pnlTicks > 5 THEN timeExit SET seconds=1800 transmit=truescaleOut
Scales out of a position by selling portions of the position at predetermined price levels. This helps lock in profits while letting the remaining position run.
riskCap
Limits the risk per trade to a specified percentage of the account. This helps manage overall portfolio risk by controlling position sizes.