Trailing stops are a popular feature in trend following strategies.
They provide downside protection and allow you to ride the big trends.
Try out these simple yet effective trailing stops for your next trend strategy!
A trailing stop is a dynamic stop loss that moves in tandem with prices to protect your floating profits.
If you’re in a long trade, the trailing stop moves upward as profits accrue. If prices move against you, however, the stop does not move.
The chart below shows a 100-pip trailing stop applied to a trend trade. The stop is pegged to the most favourable price obtained thus far in the trade, and moves upwards as prices rally. It is eventually triggered on a pullback, locking in a substantial profit.
In this way, the trailing stop protects your downside, without limiting your profit potential (unlike time stops and profit targets).
Due to these benefits, I’m a big fan of using trailing stop in my trend following strategies. Most of the trend strategies in the Free Strategies section contain some sort of trailing stop.
The pip-based trailing stop illustrated above is the among the simplest you can implement, though it remains very effective. Pip-based stops are essentially similar to $-based stops, except that they are insensitive to currency appreciation/depreciation.
Of course, pip-based stops are not your only option. This post will highlight 5 additional trailing stops that are both effective and easy to program.
1. ATR Trailing Stop
The average true range (ATR) is one of Wilder’s famous creations and is probably the most popular volatility measure among retail traders.
A bar’s true range is the greatest of the following:
- Current high – current low
- Current high – previous close
- Current low – previous close
In most cases, true range will simply be equal to the bar range (high – low). However, if large price gaps are present, true range will exceed the bar range.
A 14-period rolling average is then applied to the true range to produce the ATR.
The ATR indicator is available on MT4 by default. Notice how it rises as volatility increases.
There are two main advantages of using ATR-based trailing stops over pip-based stops.
- Since it automatically adapts to market volatility, you can use the same trailing stop across different timeframes and/or markets. This is useful when performing out-of-sample tests on your strategy.
- If you use fixed fractional position sizing, or something equivalent, an ATR-based stop will adjust your position sizes according to volatility. You will trade smaller sizes in volatile markets, and larger sizes in quiet markets.
Markets are constantly evolving and traders need to adapt to stay in the game. In the same vein, adaptive strategy elements make a lot of sense to me.
Nonetheless, there are times when pip-based trailing stop actually outperform ATR-based stops.
It’s difficult to pinpoint the reason for this. Perhaps the ATR is chasing the market and the resulting stop distances are suboptimal.
As usual, your best bet would be to find the trailing stop type that displays the best performance across the most markets.
2. Standard Deviation Trailing Stop
This is similar to the ATR stop above, except that standard deviation is used as the volatility measure.
Standard deviation measures the degree of dispersion from the average price, as per the formula:
Closing prices are usually used. Don’t worry if you’d rather not calculate that; MT4 provides the standard deviation indicator. The 14-period standard deviation is shown together with the ATR, applied to the same price series above.
Both indicators show the same trends, but the standard deviation seems more volatile. Why this difference?
Standard deviation accounts for directional volatility, while ATR does not. Consider the two hypothetical price series below. Each of them consists of 4 bars of identical high-low range.
The first is from a flat market, while the second is from a steadily trending market.
If you use the ATR, both markets will give the same value.
But if you use standard deviation, the trending market will give a higher value than the flat market. If you look at the standard deviation formula, this is because the increasing prices are further away from the mean.
If you find a market that is steadily trending, like the one below, the differences between standard deviation and ATR will become more apparent.
Here the standard deviation captures directional volatility much better than the ATR, and this causes its value to increase much more than the ATR.
So if you’re trading markets that trend often, standard deviation may be a better choice than the ATR. As usual, run your backtests, and let the results speak for themselves.
3. Moving Average Trailing Stop
Every trend trader has tested moving averages at some point.
Personally, I don’t find them particularly effective for generating entries, but they do a decent job as trailing stops.
Two very popular trend following indicators, the Bollinger Bands and Keltner Channels, come with inbuilt moving average trailing stops. The Bollinger Bands use a simple moving average, while the Keltner Channels use an exponential moving average (together with typical prices instead of closing prices).
The chart below shows a trend trade using the 50-period Bollinger Bands. A long trade is entered when price penetrates the upper Bollinger Band, and is closed when price penetrates the middle moving average.
If you think this moving average stop is too tight, you can also use the upper/lower Bollinger bands as stops. This is quite similar to using a standard deviation trailing stop (mentioned above). I tested both of the Bollinger Bands’ inbuilt trailing stops, and results were pretty good for such a basic trend strategy.
Suppose you’ve decided to give moving average trailing stops a try. I know what you’re thinking – which moving average should I use? Simple, exponential, linear weighted…?
The chart below shows an overlay of the 50-period simple, exponential and linear weighted moving averages. There really isn’t much difference between them, except that the exponential and linear weighted ones place more emphasis on recent prices.
To minimize curve fitting, I prefer to keep strategies as simple as possible. I have tested simple and exponential moving average the most, and believe they do the job well enough.
If you’re looking for a more ‘exotic’ moving average that adapts to market noise, you can check out the Kaufman Adaptive Moving Average (KAMA). The KAMA’s reacts quickly in trending markets, and slowly in flat noisy markets.
Ultimately, I think the choice of moving average does not matter that much. As long as you give your trades enough breathing space by using a mid to long-term moving average, you should be good to go.
4. Donchian Channel Midpoint Trailing Stop
Donchian channels are created by plotting the highest high and lowest low over the lookback period. Like the Bollinger Bands, the channel width is an indication of market volatility.
Don’t let the Donchian channel’s simplicity fool you. It was the basis of the famous Turtles experiment in the 1980s, and we all know how well that turned out.
The Donchian channel is not available by default in MT4, but you can download one from the MQL5 marketplace.
The chart below shows a 50-period Donchian channel. The middle line is computed as the midpoint of the upper and lower lines, and is a popular trailing stop among trend traders.
Lower penetration of the channel implies strong downside momentum, and is an opportunity to enter short. When prices close above the midpoint, reversion to the mean has occurred, and the trade is exited.
If you find the Donchian midpoint stop too tight, you can add a pip or ATR-based buffer.
On a related note, if you use a 26-period lookback, the Donchian midpoint is equal to the Ichimoku’s Kijun-sen line. The Kijun-sen is commonly used as a trailing stop among Ichimoku traders; this probably isn’t a coincidence.
5. Parabolic SAR Trailing Stop
The Parabolic SAR (stop and reverse) indicator is another Welles Wilder creation that is often overshadowed by the ATR and RSI.
The PSAR is used to determine trend direction and price reversals. It is available in MT4, and appears as a series of dots, either above or below the price.
When the PSAR is below the price, the market is in an uptrend. Conversely, when the PSAR is above the price, the market is in a downtrend.
The PSAR was built on the concept that time in the market should be minimized. The critical parameter in the PSAR’s calculation is the acceleration factor, which determines the PSAR’s volatility.
The PSAR is calculated as follows:
The PSAR thus keeps advancing towards prices, even when the market does not reach a new high/low.
If the current PSAR value is inside the current period’s bar range, the PSAR flips, signaling a change in trend direction.
When used as a trailing stop, you should exit your trades when the PSAR flips. The chart below shows a long trade entered when the 50-period CCI crosses 100, and exited when the PSAR flips to a downtrend.
The PSAR generally works great when you have smooth trends with minimal pullbacks. I find that it tends to be too volatile; it takes only a small pullback for the PSAR to flip. I recommend that you reduce the acceleration factor’s step or maximum value.
When you load the PSAR in MT4, you can change the default values as shown below:
With short-term strategies, you generally want a larger acceleration factor. But for longer-term trend following strategies, you want a smaller acceleration factor to give your trades more breathing space.
You can also use the PSAR to generate entries, but it will generate tons of false signals when the market is flat. For this reason, I wouldn’t recommend using it for entries, unless you have some rigorous entry filters in place.
If you’re big on trend following, trailing stops certainly deserve your attention.
They allow you to capture outsized gains from the occasional long trend – this can make a huge difference to your bottom line.
To give your trades more breathing space, you can activate your trailing stops only after a certain amount of profit has accrued. A simple pip or ATR-based activation level works well.
Of course, don’t forget to keep your catastrophic stop loss in place, in case your trade goes wrong right from the start. Together with the trailing stop, you’ll have a simple and robust trade management solution.
What do you think of trailing stops? Let me know in the comments!