Skip to main content
Version: 2.0

SLM - Stop Loss Manager

This page provides a detailed explanation of each input parameter, enabling you to configure the Stop Loss Manager widget to suit your needs. While the default input parameters offer a universally applicable configuration, tailoring the Stop Loss Manager widget to the specific symbol and timeframe you're working with is recommended. This might seem daunting initially for beginners, but rest assured, the default parameters are a great starting point. Professional and advanced traders will likely need different input settings for symbols and timeframes.

To optimize the input parameters, consider using the tester mode. Refer to the related article to familiarize yourself with this feature of the Meta Extender.

Parameters for breakeven trailing

The breakeven trailing method implies that the stop loss value is only modified once at a specific price. This ensures that already-made profits are secured. The sudden jump in stop loss will occur when the trade is already in a respectable profitable zone, and it's not expected that the trade will change its direction.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (SLM) Breakeven position
(IN_nUiSlmBreakevenPosition)
130The input value cannot be smaller or equal to 0.

You can use the Breakeven position input parameter to define the moment when the jump will occur. The initial distance between the opening price and initial stop loss represents the reference value 100. Let's assume this was 80 pips. If the > (SLM) Breakeven position is set to 150, the jump to breakeven will occur when the price rises 40 pips above the opening price. As seen in the illustration below, the larger the breakeven position, the later the jump.

Configuration, Stop loss manager, Breakeven trailing mode function principle and examples.png
danger

This trailing method should only be used with a take profit or by manual supervision and closing the trade. Since the stop loss value never changes again, the maximum outcome will be zero profit. Fees such as commission or swap are not included in the calculation of the breakeven price.

Parameters for market trailing

Market trailing doesn't rely on complex algorithms. Instead, it uses the open and close prices of the previous candle sticks, combined with the spread, to calculate its movements. The only adjustable variable is a buffer added to the stop loss distance. This buffer can be calculated by two parameters: a fixed value measured in pips (> (SLM) Market buffer fix) or/and a dynamic value based on the current spread (> (SLM) Market buffer spread).

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (SLM) Market buffer fix
(IN_dUiSlmMarketBufferFix)
5.0This parameter introduces a buffer to the stop loss level, calculated based on a fixed number of pips.
The input value cannot be smaller or equal to 0.
> (SLM) Market buffer spread
(IN_dUiSlmMarketBufferSpread)
4.0This parameter introduces a buffer to the stop loss level, calculated based on a fixed number of pips. However, in this case, the parameter multiplies the current spread value. The product of this multiplication determines the buffer level.
The input value cannot be smaller or equal to 0.

Based on the spread, the dynamic option is handy to avoid being stopped during night hours. For instance, the ask price is crucial for long trades to define when a trade will close. However, the stop loss level might come too close if the spread is too large. Therefore, during phases of large spread, the market trailing variant can automatically adapt the buffer to better react in volatile phases or during night hours.

The effect of the input parameter can be observed in the chart below.

Configuration, Stop loss manager, Market trailing mode function principle and examples.png

As can be seen, both parameters move the stop loss line further away from the actual price. Both buffer types can be combined freely. If used together, their values will be added to each other.

Parameters for average true range trailing

The average true range (ATR) trailing method employs an ATR indicator to calculate the stop loss distance. This widely used indicator is a standard tool for assessing a price chart's volatility.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (SLM) ATRS multiplier
(IN_dUiSlmAtrsMultiplier)
3.5The input value cannot be smaller or equal to 0.
> (SLM) ATRS period
(IN_nUiSlmAtrsPeriod)
14The input value cannot be smaller or equal to 0.

The parameters for configuring the ATR trailing method include the > (SLM) ATRS period, the period used to calculate the ATR indicator, and the > (SLM) ATRS multiplier. The raw ATR value is typically too small to be used as a trailing stop loss distance, so it's common to multiply the raw indicator value with a multiplier. A frequently used value for the multiplier is 3.5.

Configuration, Stop loss manager, ATRS trailing mode function principle and examples.png

By adjusting these values, the ATR trailing method can respond more to the current price.

Parameters for parabolic SAR trailing

Parabolic SAR (PSAR) trailing stop losses utilize a PSAR indicator, another standard tool in modern trading. This indicator usually comes with two input parameters.
Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (SLM) PSAR step
(IN_dUiSlmPsarStep)
0.02The input value cannot be smaller or equal to 0.
> (SLM) PSAR maximum
(IN_dUiSlmPsarMaximum)
0.2The input value cannot be smaller or equal to 0.

The PSAR value is directly taken as the stop loss, depending on whether the current PSAR value qualifies. Since the PSAR is drawn above or below the price chart, there are phases when the PSAR does not output valid values for stop losses. This typically happens when a trade is opened. When the PSAR changes its characteristic, the stop loss may move quickly close to the price. The input parameters > (SLM) PSAR step and > (SLM) PSAR maximum are used to adapt this movement.

Configuration, Stop loss manager, PSAR trailing mode function principle and examples.png

The lower these values are, the more gently the stop loss moves towards the price value.

Parameters for stepwise trailing

The stepwise trailing method incrementally moves the stop loss closer to the current price. Each step is of equal size, and the next step is executed when the price increases by a specified value. As is customary in this application, the input parameters for this trailing method are defined with relative parameters. In this case, the initial stop loss difference, the price difference between the opening price and the initially configured stop loss, represents the unitless reference value of 100.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (SLM) Steps size
(IN_nUiSlmStepsSize)
80The input value cannot be smaller or equal to 0 and not greater than or equal 100.
> (SLM) Steps position
(IN_nUiSlmStepsPosition)
130The input value cannot be smaller or equal to 100.

The input parameter > (SLM) Steps size determines the size of each step, while > (SLM) Steps position indicates when the next step will be executed. As previously mentioned, both values are relative. For instance, if the initial stop loss difference is 100 pips and > (SLM) Steps size is set to 130, the next step will occur when the price reaches initial stop loss + 130 pips. Subsequently, the next step will be executed at initial stop loss + 260 pips. This pattern will continue until the trade is eventually stopped out.

If > (SLM) Steps position is set to 80, the stop loss value will increase to initial stop loss value + 80 pips at the first step and to initial stop loss value + 160 pips at subsequent steps. This pattern will also repeat until the trade is stopped out.

The illustration below demonstrates the function principle and provides two examples of the operation of this stop loss trailing method.

Configuration, Stop loss manager, Stepwise trailing mode function principle and examples.png

Please note that > (SLM) Steps position cannot be less than 100, and > (SLM) Steps size cannot exceed 100. Setting both values close to their minimum or maximum input value makes the steps more frequent. The time interval between the two steps depends on the actual price movement, which triggers the stop loss to jump to the next step.

Parameters for time based trailing

Another method for managing the stop loss is a time-based trade closure. Technically, this doesn't constitute trailing since the stop loss value remains unchanged. Instead, when this method is selected, the trade will be closed after a predetermined time, irrespective of its current performance.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (SLM) Time count
(IN_nUiSlmTimeCount)
15Positive values represent the period, measured in bars, in the currently active timeframe. On the other hand, negative values represent the period measured in seconds.

The period is determined by the input parameters > (SLM) Time count and can be utilized in two ways. Positive values represent the period measured in bars in your current timeframes. For instance, if the value is set to 10 and you're trading in the M5 timeframe, the trade will be closed after 50 minutes. Conversely, negative values represent the period measured in seconds. A value of -3600 indicates that the trade will be closed precisely 60 minutes after it's opened, while -7200 signifies a closure time of 120 minutes after the trade is opened. The following illustration demonstrates the function principle and provides two examples of positive values for > (SLM) Time count.

Configuration, Stop loss manager, Time count trailing mode function principle and examples.png

As illustrated, the stop loss value remains unchanged in both examples.

Parameters for linear steps trailing

The linear steps stop loss trailing method increases the stop loss after each bar in the currently active timeframe, resulting in a strictly linear rise in the stop loss value.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (SLM) Linear step
(IN_nUiSlmLinearStep)
5The input value must be greater than 0. Lower values might result in a static stop loss, as the smallest price increment could be larger than the desired step size.

As is customary, the initial stop loss distance is determined by the difference between the opening price and the initial stop loss. This value represents the unitless value of 100. The only input parameter for this trailing method is the step size, defined by > (SLM) Linear step. The default value is 5, meaning the stop loss will increase by 0.5% x the initial stop loss difference after each closed bar. For instance, if the initial stop loss difference was 1000 pips, the stop loss level will increase by five pips after every closed bar. The increment might be tiny in some timeframes and initial stop loss values, so the next step could be smaller than the smallest increment for changing the stop loss.

The following illustration briefly explains the function principle and visualizes it with two examples.

Configuration, Stop loss manager, Linear step trailing mode function principle and examples.png

The value must be greater than 0.

Parameters for HiLo trailing

With the HiLo trailing method, the stop loss is set to the lowest local low or highest local high, depending on the direction of the trade. The lowest local low within a certain period, measured in bars, is used for long trades. The stop loss value is adjusted if a higher local low appears within the observed period. There's no limit to how often the stop loss value can change, but it can only increase for long trades. The function principle for short trade is vice versa.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (SLM) HiLo period
(IN_nUiSlmHiLoPeriod)
20The input value cannot be smaller or equal to 0.

The only variable that affects this trailing method is the observed period, defined by > (SLM) HiLo period. This value specifies the number of bars preceding the current time. The larger the value, the further the stop loss is typically from the price chart. The illustration below demonstrates the function principle and provides some examples.

Configuration, Stop loss manager, HiLo trailing mode function principle and examples.png

As shown, all examples illustrate trades made in a long direction. For short trades, the behavior is reversed. This trailing method often aligns with previous short-term support and resistance values.