Stop loss - Catching up trail
The Stop loss - Catching up trail module sets a trailing stop loss (SL) that catches up with the price as the profit grows. From Gain0 the distance between the price and the SL decreases; from Gain1 the SL trails the price at the Trail minimum distance. Use it to give a trade room at first and protect more of the profit later.
How it works
Section titled “How it works”- When the order reaches the Profit threshold, the SL is set Offset pips below the current price, and trails it.
- From Gain0 pips of profit, every new high moves the SL closer to the price.
- From Gain1 pips of profit, the SL trails the price at the Trail minimum distance.
- The SL only moves on a new high. When the profit falls back to the SL, the order closes.
Settings
Section titled “Settings”- Name: optional, tells this module apart from others of the same kind. See Name.
- Profit threshold (pips): when the module activates. With 0 it activates when the order opens and sets the SL at the Offset distance; with 10 it activates when the order has 10 pips of profit. Use a positive value.
- Offset (pips): the initial distance of the trailing SL: current price − Offset. Use a positive value.
- Gain0 (pips): from this profit the SL starts to decrease the trailing distance. Use a positive value, greater than or equal to the Profit threshold.
- Gain1 (pips): at this profit the SL is at the Trail minimum distance from the current price. Set it bigger than Gain0 for a gradually increasing gain.
- Trail minimum distance (pips): from Gain1 onward, the SL trails the price at this distance. With 0 or a negative value the SL overtakes the price, which closes the order.
Examples
Section titled “Examples”Both examples use: Profit threshold = 0, Offset = 10, Gain0 = 15, Gain1 = 25 and Trail minimum distance = 1.
Related
Section titled “Related”- Stop loss - Trailing: a trail with a fixed step size
- Stop loss - Conditional: a trailing SL that starts on a condition
- Stop loss: a fixed SL from the start
MetaTrader is a registered trademark of MetaQuotes Ltd. EA Builder Pro is not affiliated with MetaQuotes.