Primitives
scaleOut
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.
scaleOut (tick)
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.
Input parameters
| Prop | Type | Default | Description |
|---|---|---|---|
steps* | number | The price step between each scale-out level | |
size* | number | The size to reduce the position by at each level | |
transmit | boolean | false | Whether to transmit the order immediately |
SQL example
POS pnlTicks > 5 THEN scaleOut SET steps=0.25, size=25scaleIn
Scales into a position by placing additional orders when price moves by a specified increment. This helps build a position gradually while managing risk.
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.