What are Bollinger Bands?

A Bollinger Band is a technical analysis tool defined by a set of trendlines plotted two standard deviations away from a simple moving average of a security’s price.

Bollinger Bands were developed and copyrighted by famous technical trader John Bollinger, designed to discover opportunities that give investors a higher probability of properly identifying when an asset is oversold or overbought.

Very well known in the trading community, Bollinger Bands contain all trading activity occurring between the two standard deviations of the expected norm, which is also known as the trend line.

Overall, Bollinger Bands make it easy for traders to buy low and sell high.

Bollinger Bands Indicator

The Bollinger Band is an excellent indicator for measuring market volatility.

The Bollinger Bands sum up the price movement of a stock and provides relative high and low boundaries. 

The Bollinger Band indicator is based on a moving average, which defines the ‘trend’ on the basis of the time frame that you choose to view.

How to Calculate Bollinger Bands using Formula?

The Bollinger Band formula consists of the Upper and Lower band, which make use of the Moving Average (ma). Before we move on to the formula for the bands, we have to calculate the ma.

The formula for Moving Average is:

Moving Average(ma) = SimpleMovingAverage(close, period)

The Upper Bollinger Band is the sum of the Moving Average and the standard deviations. The formula is:

Upper Band= ma+ devfactor * StandardDeviation(data, period)

The Lower Bollinger Band is the difference between the Moving Average and the standard deviations. The formula is:

Lower band= ma – devfactor * StandardDeviation(data, period)

Why use Bollinger Bands Trading Strategy?

To measure market volatility, standard deviation formula is used. It showcases how the stock price may vary from its original value. 

Bollinger Bands measure this market volatility and then adjust themselves to the market conditions accordingly. This makes the Bollinger Bands Trading Strategy so handy for traders.

Through this trading strategy, traders can find most of the price data required between the two bands, ensuring the correct market entry and exit.

How to use Bollinger Bands Trading Strategy?

There are three lines that compose Bollinger Bands: A simple moving average (middle band) and an upper and lower band.

The upper and lower bands are typically 2 standard deviations +/- from a 20-day simple moving average but can be modified.

Prices have a tendency to bounce within the bands’ envelope, touching one band then moving to the other band. You can use these swings to help identify potential profit targets. For example, if a price bounces off the lower band and then crosses above the moving average, the upper band then becomes the profit target. 

Price can exceed or hug a band envelope for prolonged periods during strong trends. A strong trend continuation can be expected when the price moves out of the bands.

Bullish Scenario

  • When the price touches the lower bands, it signifies that the price is oversold and has a tendency to bounce back.
  • When n the prices stay above the upper band for some time, it signifies that the uptrend is extremely strong

Bearish Scenario

  • When the price touches the upper bands, it signifies that the price is overbought and has a tendency to return back.
  • When the prices stay below the lower band for some time, it signifies that the downtrend is extremely strong.

Building Bollinger Bands Strategy on Mudrex

You can create strategies on Mudrex using simple ‘blocks’. You can connect multiple blocks and define conditions on those connections or ‘paths’ to create your strategy on Mudrex.

As discussed above, lets first write our entry/exit conditions so that we know what to do:

BUY: When the price goes below the lower band, it signifies that the price is oversold. When it starts recovering, then one should take a long position.

Buy when price crosses up the lower band. 

SELL: To close the long, wait for the price to go above the middle line, and then when the trend has exhausted, one should sell.

Sell when price crosses down the middle line

Final Strategy: The overall strategy on Mudrex looks like this

Testing

We can now run a quick back-test to see how our strategy performs.


Quick links