Primitives
flatten
Closes all open positions immediately. This is typically used as an emergency exit or to reset the trading state.
flatten (tick)
Closes all open positions immediately. This is typically used as an emergency exit or to reset the trading state.
Input parameters
| Prop | Type | Default | Description |
|---|---|---|---|
transmit | boolean | true | Whether to transmit the flatten command |
SQL example
IF POS flatten
POS pnlTicks > 5 THEN flatten SET transmit=true