Skip to content

Stop loss - Catching up trail

The Stop loss - Catching up trail - Close module, allows a trader to set a trailing stop loss, which decreases the distance between the current price and the SL after Gain 0 (in pips) was gained. From the moment the final gain of Gain 1 has been reached, the SL will trail the current price with a distance of 1 pip.

The module also allows the trader to use a gradually increasing gain by setting gain1 to a value bigger than Gain 0.

Settings

  • Profit threshold (pips): This value determines at what moment the module activates. When set to 0, the module activates when the order is opened and sets the SL to the distance of the Offset (pips) parameter. F.e. when set to 10, the module activates when an order gained 10 pips of profit. Use a positive value to set this parameter.
  • Offset (pips): This value sets the initial distance of the trailing SL. A value of 10 sets the offset to: current price – 10 pips. Use a positive value to set this parameter.
  • Gain 0 (pips): When an order has gained a profit value equal to the value of this parameter (in pips), the trailing SL starts to decrease the trailing distance. Use a positive value to set this parameter, greater than or equal to the Profit Threshold (pips).
  • Gain 1 (pips): The module starts to decrease the trailing distance if the order gains new highs. When the profit in pips reaches the value of this setting, the SL will be at 1 pip distance.
  • Trail minimum distance (pips): the trail will not get closer to the current price than the set value, in pips. This is usefull when using a Trail step size of more than 1 and you want the trail to keep a certain distance from the current price. Warning: when set to 0 or any negative number, the trail will overtake the price, causing the order to close.

Examples

Stop loss catching up trail, example 1
The first example shows what the module is doing, given parameter values: Profit Threshold = 0, Offset = 10, Gain 0 = 15 and Gain 1 = 25). Evidently, a straight line up is not realistic, but this way it becomes clear what the effect is of the parameter values.
Stop loss catching up trail, example 2
The second example uses the same parameter values in a more volatile scenario. Notice that from a profit of 5 pips onward the SL rises a bit faster, and stays at its highest value when the order isn't gaining hew highs.