Skip to content
All library documents

Using Bollinger Band Width to Identify Trend Exits

Article MQL5 code base

Summary

BoDi measures the distance between the upper and lower Bollinger Bands and displays that width as a histogram. Because the bands widen as volatility rises and contract as it falls, the author interprets expansion as an active directional impulse and contraction as a sign that the move may be weakening. The indicator is presented as an exit aid for trend and breakout trades, particularly in currencies described as having impulsive price behavior.

For automated exits, the document proposes looking for a recent peak in BoDi followed by consecutive declines, with the peak required to exceed the most recent reading by a specified ratio. It suggests calculating the bands with a 20-period EMA and typical price. The document provides the indicator formula and an algorithmic rule, but no performance tests or comparative evidence. Band contraction can indicate declining volatility without confirming a reversal or the end of a trend, so the proposed signal is best understood as an additional exit input rather than a validated standalone strategy.

Key ideas

  • BoDi is the difference between the upper and lower Bollinger Bands, scaled for display.
  • Band widening represents rising volatility, while narrowing represents declining volatility.
  • The author proposes using a recent BoDi peak followed by declines as a possible exit signal.
  • The suggested calculation uses a 20-period EMA and typical price.
  • The document supplies no empirical results establishing the signal’s reliability.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.