How Good Are The Bollinger Bands’ Trailing Stops?

Jan 10, 2021

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.

Wrapping Up

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.

Powered By

Development Platform

Forex VPS

FXVM Forex VPS

Popular Posts

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

read more

What is Fixed Ratio Money Management?

Have you heard of fixed ratio money management? How does it compare to the popular fixed fractional approach? Here I’ll explain how fixed ratio works, and see how it stacks up against fixed fractional money management.

read more

Build a Diversified Portfolio With QuantAnalyzer

The ability to efficiently trade a diversified portfolio of strategies is one of the biggest advantages of algorithmic trading. Here we will use QuantAnalyzer’s Portfolio Master to build a portfolio consisting of high performing, uncorrelated strategies.

read more

What Is the QQE Indicator?

The QQE is a mysterious indicator that sometimes pops up in trading forums. Does it deserve a place alongside the more traditional momentum indicators like the RSI and CCI? Let’s add it to a trend following strategy to find out!

read more

Make your money work for you!

Get promotions, trading ideas and strategy development tips delivered to your inbox!

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Trading Strategies

What’s the Best Time to Trade Forex?

What’s the Best Time to Trade Forex?

The forex markets are open 24/5, but not all hours are created equal. Here I dissect my broker data to determine the best time to trade forex.

Forex Weekend Gaps: Can You Exploit Them?

Forex Weekend Gaps: Can You Exploit Them?

Have you noticed that forex weekend gaps usually reverse within 3 days? Here I’ll program a mean reversion strategy to exploit gaps over the last 18 years!

Money Flow Index: An Improved RSI?

Money Flow Index: An Improved RSI?

The Money Flow Index is sometimes called the volume-weighted RSI. Can it outperform the RSI in this trend following strategy?

Automated Bollinger Bands Squeeze Forex Strategy

Automated Bollinger Bands Squeeze Forex Strategy

StrategyQuant’s BBWR indicator is the perfect tool to detect a Bollinger Bands squeeze. Here I explain how it’s calculated, and use it to program a breakout strategy for the AUDJPY!

Should You Use the Kelly Criterion for Forex Trading?

Should You Use the Kelly Criterion for Forex Trading?

The Kelly criterion is a famous mathematical formula that attempts to maximize your long-term capital growth. In this post, I’ll apply it to a EURUSD breakout strategy and explain some of its potential shortcomings when applied to forex trading.

Can a Trading Pause Improve Your Trend Following Results?

Can a Trading Pause Improve Your Trend Following Results?

A temporary trading pause can improve your win rate if you’re trend following a volatile market. Here I’ll program a trading pause into a simple breakout strategy, and test its effectiveness on the Widow Maker – the GBPJPY.

Laguerre RSI Trend Following Strategy

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

How to Use the Supertrend Indicator

How to Use the Supertrend Indicator

Despite its cool name, the Supertrend indicator often seems to slip under the radar. Here I explain how it’s calculated, and combine it with moving averages to produce a simple trend following strategy.

Strategy Development

Do You Know Your System Quality Number?

Do You Know Your System Quality Number?

The System Quality Number measures the profitability & consistency of your trading system. Here’s how to calculate your SQN and use it to improve your trading!

How to Get a Realistic Backtest Spread

How to Get a Realistic Backtest Spread

Your choice of backtest spread can certainly make or break a strategy. This post will show you how to study the intraday spread variations of your market, and suggest several ways to avoid paying ridiculous spreads.

Do You Know Your Strategy’s Optimization Profile?

Do You Know Your Strategy’s Optimization Profile?

Your strategy’s optimization profile often reveals its robustness, helping you select strategies that will remain profitable in live trading. Here I explain why an optimization profile is important, and how you can easily obtain one using StrategyQuant’s optimizer.

Which MT4 Backtest Report Metrics Should You Use?

Which MT4 Backtest Report Metrics Should You Use?

Understanding your backtest report is an essential part of being a successful strategy developer. Here I explain what the numbers mean, and how you can make use of each metric during strategy development.

Out-of-sample Testing Using Monte Carlo Simulations

Out-of-sample Testing Using Monte Carlo Simulations

Traders often use Monte Carlo simulations to estimate worst-case drawdowns, but did you know they can be used for out-of-sample testing too? This post demonstrates the use of StrategyQuant’s Monte Carlo simulator to randomize historical prices and strategy parameters, helping you select robust strategies for live trading.

How Many Trades Should Your Backtest Have?

How Many Trades Should Your Backtest Have?

We all want a large sample of trades in our backtests, but practical limitations such as data availability often get in the way. Here I’ll explain why 30 trades is insufficient, and how you can use standard error to quantify the uncertainty arising from a small sample size.

Build a Diversified Portfolio With QuantAnalyzer

Build a Diversified Portfolio With QuantAnalyzer

The ability to efficiently trade a diversified portfolio of strategies is one of the biggest advantages of algorithmic trading. Here we will use QuantAnalyzer’s Portfolio Master to build a portfolio consisting of high performing, uncorrelated strategies.

Strategy Optimization Using MT4

Strategy Optimization Using MT4

How do you improve your trading strategy in MT4? This post will show you how to optimize the entry and exit parameters for a moving average crossover strategy. Finally, an intraday time filter will be added to help avoid false breakouts.

Debugging & Backtesting Using MT4

Debugging & Backtesting Using MT4

With a fresh algorithm at your fingertips, how do you verify that it has been programmed correctly? This guide will show you how to use Metatrader 4’s visual backtester to debug and backtest your strategy.

Create Your Trading Algorithm in 15 Minutes (FREE)

Create Your Trading Algorithm in 15 Minutes (FREE)

Converting your trading idea into an algorithm is the first step towards reaping the benefits of automated trading. This guide will cover the creation of a simple moving average crossover algorithm, without any actual programming.

What Is Drawdown in Trading?

What Is Drawdown in Trading?

Are you getting a comprehensive assessment of your strategy’s downside? This post will discuss several methods to measure drawdowns, helping you build and select strategies that better suit your risk appetite.

Live Trading

What’s the Best Time to Trade Forex?

What’s the Best Time to Trade Forex?

The forex markets are open 24/5, but not all hours are created equal. Here I dissect my broker data to determine the best time to trade forex.

How to Find a Real Trading Guru

How to Find a Real Trading Guru

Every day I come across a trading guru offering educational content on the internet. Many of them speak of huge returns with minimal effort. Should these be trusted? Here’s some tips on how to separate the wheat from the chaff.

How to Enjoy Stress-Free Trading

How to Enjoy Stress-Free Trading

Trading is a great way to make some additional income, but not if you’re constantly pulling your hair out. Here I offer 7 tips to help make your trading profitable and stress-free.

How to Select the Best Forex VPS

How to Select the Best Forex VPS

A virtual private server (VPS) is a virtual computer that you can rent and access remotely. It provides a reliable platform on which to execute your forex strategies. This post will help you decide whether you need a VPS, and show you how to select an optimal VPS.

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Pin It on Pinterest

Share This