Primitives
followStopLoss
Follow Stop Loss with a stop loss percentage or ticks and some options to make it invisible(not visible to the broker), it follows the the position price and modifies the stop loss order to trail the position.
followStopLoss (position)
Follow Stop Loss with a stop loss percentage or ticks and some options to make it invisible(not visible to the broker), it follows the the position price and modifies the stop loss order to trail the position.
Input parameters
| Prop | Type | Default | Description |
|---|---|---|---|
percent | number | 0.3 | The percentage of risk to take |
ticks | number | 3 | The number of ticks of risk to take |
invisible | boolean | true | Whether to make the stop loss invisible to the broker |
transmit | boolean | true | Whether to transmit the stop loss order to the broker |
SQL example
IF POS followStopLoss invisible=false transmit=false
POS pnlTicks > 5 THEN followStopLoss SET ticks=10 transmit=true