Introduction

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.

Indicator type

Volatility

Formula

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

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

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

How to use

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 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. 

Compare Block for Buy Signal over Mudrex

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

Compare Block for Sell Signal over Mudrex

Final Strategy: The overall strategy on Mudrex looks like this

Bollinger Band Trading Strategy over Mudrex

Testing

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

Back-Test Results for Bollinger Bands

Quick links