Primitives

trailingStopLoss

TrailingStopLossAlgo is a model that follows the position and adjusts the stop loss as the price moves in favor.

trailingStopLoss (position)

TrailingStopLossAlgo is a model that follows the position and adjusts the stop loss as the price moves in favor.

Input parameters

PropTypeDefaultDescription
percentnumber0The percentage of trailing stop loss
ticksnumber0The number of ticks for trailing stop loss
transmitbooleanfalseWhether to transmit the trailing stop loss order

SQL example

IF trailingStopLoss ticks=10 transmit=false
        POS pnlTicks > 10 THEN trailingStopLoss SET ticks=10, transmit=true

On this page