Automated Bollinger Bands Squeeze Forex Strategy

Sep 13, 2021

The Bollinger Bands squeeze is a common signal of an upcoming breakout.

In this post, I’ll introduce the Bollinger Bands Width Ratio indicator, and use it to program a breakout strategy for the AUDJPY.

You can download the complete strategy in the Free Strategies section.

Bollinger Bands are the ever-popular indicator for trend following and mean reversion traders alike.

StrategyQuant provides a Bollinger Bands Width Ratio (BBWR) indicator, which measures the width between the upper and lower bands.

With this indicator, you can detect a Bollinger Bands squeeze and prepare for a potential breakout.

But first, here’s a quick primer on Bollinger Bands and what they signify.

Bollinger Bands and Volatility Cycles

Bollinger Bands consist of a 20-period simple moving average surrounded by a pair of upper and lower bands. These bands are placed at 2 standard deviations above/below the moving average.

In the chart below, you can see how the bands elegantly convey market volatility and trend direction.

The rising moving average indicates an uptrend, while the band width measures market volatility.

Market volatility is often cyclical in nature. Volatility is high when the market trends, and subsequently falls when prices consolidate. The Bollinger Bands therefore alternate between periods of expansion and contraction.

Bollinger Bands Width Ratio Indicator

The BBWR indicator is not available in MT4 by default, but you can download it here.

It quantifies the expansion and contraction of the Bollinger Bands. It uses the following simple calculation:

Here’s the BBWR plotted below prices in MT4:

Small BBWR values indicate a Bollinger Bands squeeze. Reduced volatility often happens before major economic announcements, where the vast majority of market participants wait on the sidelines, ready to jump onboard a trend should a breakout occur.

Large BBWR values indicate strong market trends. Sudden spikes in BBWR indicate a parabolic market move, which often spells the impending end of a trend.

Exploiting the Bollinger Bands Squeeze

Let’s program a Bollinger Bands squeeze breakout strategy for the 1-hour AUDJPY.

The idea is to use a 30-period BBWR to detect a squeeze, which could signal an upcoming breakout.

Quantifying a visual pattern is always a challenge in algorithmic trading.

In this case, I’ll define a squeeze as the BBWR reaching its lowest level in 60 periods.

To improve the win rate, I’ll only take breakouts in the direction of the longer-term trend.

I’ll use a simple momentum filter to determine trend direction. An uptrend is present if the current close is above the close 50 periods ago.

If this squeeze occurs during an uptrend, I’ll place a buy stop at the prior day’s high.

Here’s how a long entry looks:

I’ll use a 70-pip initial stop loss and trailing stop. I find this simple combination works surprisingly well for trend following strategies.

AlgoWizard Programming

Here are the simple entry conditions in AlgoWizard:

Note that there are two different lookback periods in use for the BBWR condition.

‘BB_Period’ is the lookback period for the BBWR itself, which is set to 30.

‘BBWR_Lookback’ is the period used to determine the minimum BBWR value, which is 60.

Stop entries and trade management are programmed as follows:

‘HighD[1]’ refers to the previous day’s high.

Backtesting the Bollinger Bands Squeeze Strategy

It’s easy to cherry pick a handful of spectacular trades from any strategy.

To combat this, I always backtest my strategies over the long-term.

Here’s a 10-year backtest of the BBWR breakout strategy on the 1-hour AUDJPY.

I redid the backtest using MT4’s backtest engine and the statistics are similar:

Getting similar results using different backtest engines and data sources (Dukascopy vs. Alpari) gives me confidence that the strategy has an edge.

Wrapping Up

The BBWR indicator is a great way to quantify the expansion and contraction of the Bollinger Bands.

Small BBWR values indicate a band squeeze, which usually occurs before a breakout.

Abnormally large values reflect a parabolic market move, which can spell the end of a trend.

If you prefer using the Bollinger Bands for mean reversion instead, here’s how you can combine them with candlestick patterns.

You can download the complete strategy in the Free Strategies section.

Powered By

Development Platform

Forex VPS

FXVM Forex VPS

Popular Posts

No Results Found

The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.

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

Forex Trading With Volume – Does It Work?

Forex Trading With Volume – Does It Work?

Volume is seldom discussed in forex trading. But as a stock trader would tell you, volume provides insights into the underlying market sentiment. Here I’ll demonstrate the use of two simple volume filters to improve entry reliability.

What Is the Kaufman Adaptive Moving Average?

What Is the Kaufman Adaptive Moving Average?

The Kaufman Adaptive Moving Average is a unique indicator that automatically adapts to the market’s noise. Here I explain its inner workings and show you how to build a trend following strategy around it.

Awesome Oscillator Forex Trend Strategy

Awesome Oscillator Forex Trend Strategy

The Awesome Oscillator is one of Bill Williams’ fine creations. It is a simple yet effective momentum indicator that can be a valuable addition to your strategy. Here we’ll use it together with a moving average to fine-tune our trend following entries.

Dual CCI Indicator Forex Trend Strategy

Dual CCI Indicator Forex Trend Strategy

The Commodity Channel Index (CCI) is an underrated momentum indicator that is often overshadowed by the RSI and MACD. I’ll show you how to build a simple trend following strategy using a pair of CCI indicators!

What is Fixed Ratio Money Management?

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.

What Is the Kaufman Efficiency Ratio?

What Is the Kaufman Efficiency Ratio?

Avoiding false breakouts is a common goal among trend traders. The Kaufman Efficiency Ratio provides a simple method of quantifying a market’s noise, helping traders focus on the smoothest trends. Let’s add the efficiency ratio to a simple trend following strategy and see whether its performance improves.

What Is the QQE Indicator?

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!

Do Bollinger Bands + Candlestick Patterns Work?

Do Bollinger Bands + Candlestick Patterns Work?

Bollinger Bands are great at detecting overbought and oversold conditions. Let’s use them to develop a countertrend strategy, and then refine our entries using limit entries and candlestick patterns.

How Good Are The Bollinger Bands’ Trailing Stops?

How Good Are The Bollinger Bands’ Trailing Stops?

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!

Bollinger Bands vs. Keltner Channels

Bollinger Bands vs. Keltner Channels

Bollinger Bands are ubiquitous in the trading world, but there’s less discussion about their lesser-known cousin, the Keltner Channels. Do these perform as well as the Bollinger Bands? Let’s compare them over a broad range of input parameters.

Strategy Development

How to Select the Best Trading Strategy Entry

How to Select the Best Trading Strategy Entry

With an abundance of technical indicators available, selecting your strategy’s entry conditions can be overwhelming. This post will illustrate a method to graphically compare the profitability of different entries.

Live Trading

No Results Found

The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.

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