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

PropTypeDefaultDescription
transmitbooleantrueWhether to transmit the flatten command

SQL example

IF POS flatten
    POS pnlTicks > 5 THEN flatten SET transmit=true

On this page