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
| Prop | Type | Default | Description |
|---|---|---|---|
percent | number | 0 | The percentage of trailing stop loss |
ticks | number | 0 | The number of ticks for trailing stop loss |
transmit | boolean | false | Whether 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