Trailing stop losses are a popular feature in many trend following systems. Bollinger Bands, the ever-popular technical indicator among retail traders, actually contain two inbuilt trailing stops. Are these any good? Let’s find out!
The complete strategy can be downloaded in the Free Strategies section.
What Is a Trailing Stop?
A trailing stop loss is a dynamic order that limits the loss you can incur on a trade. Unlike rigid stop losses, trailing stops move whenever the price moves in your favour. If prices move against you, the stop stays in place. The trailing stop distance is usually measured from the most favorable market price obtained thus far.
Let’s illustrate how trailing stops work with an example.
A long trade is entered with a trailing stop of 100 pips. As prices move in your favour, the trailing stop moves upwards, maintaining a 100-pip distance from the highest price obtained thus far.
For long trends like the one above, trailing stops serve to lock in a portion of your floating profits. The maximum profit attainable is not limited by the trailing stop. This is in contrast to profit targets, which exit the trade once the target level is reached.
Trailing stops make the most sense in longer-term trend systems. They allow you to ride the trend until it reverses, while retaining most of your profits along the way.
Profit targets are usually the better choice for short-term countertrend trading, since you do not expect prices to move significantly.
Trailing Stop Drawbacks
So a trailing stop lets you limit your downside, while the upside potential remains unlimited. Sounds great, but where’s the catch?
Since the trailing stop advances with favourable price movement, a retracement may cause a premature exit. You may find yourself stopped out at a 50-pip retracement, only to eventually discover that the trend resumed for another 500 pips.
The trailing stop distance thus needs to take the market volatility into account. Volatile markets need more breathing space. I would suggest a minimum trailing stop distance of 2*ATR for such markets.
A workaround is to use an activation level for the trailing stop. For such cases, the trailing stop functions like a stationary stop loss, until your open profits reach a certain level. When this level is reached, the trailing stop is activated, and starts advancing with prices.
In the last part of this post, we’ll add in a trailing stop activation level and see whether it improves results.
Bollinger Bands and Trailing Stops
Bollinger Bands consist of a moving average surrounded by a pair of upper and lower bands. These bands are placed at a certain standard deviation multiple above/below the moving average.
The Bollinger Bands’ beauty lies in its adaptive nature, and the wealth of information elegantly conveyed using only two parameters. By default, a 20-period lookback is used for the middle moving average, and a standard deviation multiple of 2 is used for the upper/lower bands.
As shown above, the Bollinger Band’s moving average indicates the trend direction, while the upper and lower bands expand and contract in response to market volatility.
Since trailing stops work best in trend following, let’s use the Bollinger Bands for a trend strategy. With a standard deviation multiplier of 2, prices will only be outside the bands about 10-15% of the time. If prices manage to penetrate the bands, there may be enough momentum to start a new trend. So our entry logic will be:
Buy when prices close above the upper Bollinger Band
Sell when prices close below the lower Bollinger Band
The changing band widths help filter out false entries during volatile periods. When the bands expand, it becomes more difficult for prices to penetrate them.
Which Trailing Stop Should I Use?
With the entry above, there are two viable inbuilt trailing stops.
The first is the middle moving average. When the trade is entered, the initial trailing stop distance is 2 standard deviations.
The second is the opposite band. For longs, the initial stop will be 4 standard deviations below the entry price.
Here’s the tricky part. Since the Bollinger Bands are adaptive, the trailing stop distance (not just the stop price itself) will change as the trade progresses. This is unlike a fixed pip-based trailing stop.
For example, if volatility increases and the bands expand, the distance between the market price and the bands will increase. But the prevailing stop loss will only be updated if it reduces the open trade risk. In other words, the trailing stop distance will only decrease as the trade progresses.
This makes the Bollinger Band’s inbuilt trailing stop quite different from conventional pip-based trailing stops. Your stop distance could decrease even without a new equity high. This is illustrated below.
Prices are consolidating after a long uptrend. This could signal the end of a trend, and could be a good time to exit the market. With the contraction of the bands, the trailing stop distance becomes pretty tight.
This is not necessarily a bad thing. After all, if prices are not moving, why stay in the market? Wilder’s Parabolic SAR is another indicator that rapidly tightens stops if prices are not moving, so we are in good company.
But does this choke off too many profitable trades? And which trailing stop works better – the moving average or the upper/lower bands?
We’ll have to test to find out. The hourly GBPJPY will be used. From my market research, GBPJPY is one of the ‘trendiest’ markets around.
Bollinger Bands Baseline Strategy
To determine whether the Bollinger Band’s inbuilt trailing stops are worth implementing, we first need to establish some baseline performance. Let’s do that by testing a bare-bones Bollinger Bands reversal strategy.
This reversal strategy was programmed in AlgoWizard. An 80-period lookback will be used. For trend systems, longer lookbacks in the 50-100 period range tend to work better. The default standard deviation multiple of 2 will be used.
This was backtested with fixed lots using 1-minute data over the past 10 years. Results are quite encouraging.
A major downside of reversal strategies is that they’re always in the market. In addition, each trade lasted an average of 144 hours. Hopefully adding trailing stops can improve performance and reduce the time in the market.
Backtesting the Bollinger Bands’ Trailing Stops
Let’s start with the middle moving average. An 80-period simple moving average was used as the hard stop and trailing stop. By default, trailing stops in MT4 are only activated when the trade goes into profits. Adding an additional hard stop here ensures we limit our losses in all situations.
Results are definitely not up to par. A 70% increase in number of trades is good news for statistical significance, but the reduction in profit factor and return/maximum drawdown is unacceptable.
Interestingly, the time in market has dropped to 50%, and each trade now lasts an average of 49 hours, down from 144 hours previously. These statistics, together with the larger number of trades, make me believe that the moving average is too tight to be an effective trailing stop.
Let’s hope the upper/lower bands perform better as trailing stops.
The stop loss and trailing stop are now set to the upper/lower bands as shown.
Results look promising. Compared to the baseline reversal strategy, profit factor has increased from 1.35 to 1.38, and return/drawdown has increased from 5.39 to 6.66.
The average holding period is about a week, which is reasonable for a trend strategy. The time in market is 87% though. That’s a little too high for comfort. Maybe further development of this strategy should include the addition of entry filters.
Let’s take a closer look at the equity curve when using the upper/lower bands for trailing stops. It’s pretty decent except for the 904-day stagnation (red zone).
Earlier in the post, I mentioned that some trailing stops are only activated after a certain amount of profit has been obtained. Let’s see whether that can reduce our stagnation.
Adding a Trailing Stop Activation Level
A 50-pip activation level will be added to the trailing stop. This activation distance can be optimized if you wish. However, I don’t consider this parameter to be that important, so I’ll leave it unoptimized to reduce the risk of curve fitting.
Although the 50-pip activation level did reduce stagnation from 904 to 742 days, we now have 10% fewer trades and a lower return/drawdown.
If you’re wondering why we have fewer trades, it’s because the trailing stop is the only exit when the trade is in profits. With an activation level, the trailing stop’s introduction is delayed, and the trade spends a longer time in the market.
I’d prefer not to use an activation level in this case. If you need to reduce the stagnation, a better alternative would be to trade a portfolio of uncorrelated strategies.
So there you have it. The upper and lower Bollinger Bands are indeed viable options for trailing stops. If you manage to find a market that trends decently, a simple strategy like this may produce surprisingly good results.
The nice thing about using the Bollinger Bands’ inbuilt trailing stops is that no additional parameters are needed. The fewer parameters you have, the more robust your strategy tends to be.
In addition, none of the above parameters were optimized. The 80-period lookback and 50-pip trailing stop activation level were selected because they seemed logical.
Better results may be obtained if you optimize some of the parameters. For this strategy, I’d recommend only optimizing the lookback period.
As usual, if you’d like to have a go with this strategy, it can be downloaded in the Freebies section. The trailing stop activation level is included if you wish to use it. If you don’t, enter ‘0’ for ActivationPips.