Skip to content
All library documents

Visualizing Bollinger Band Width with a Custom MT5 Indicator

Article MQL5 code base

Summary

The described MT5 custom indicator plots Bollinger Bands with configurable period, shift, deviation, applied price, color, and line style. It also calculates the distance between the upper and lower bands in pips and displays that range bandwidth as a label. Users can choose to place the label on the main chart or in a numbered sub-window, and adjust its horizontal and vertical position. The sub-window option requires a companion indicator.

The document presents band width as a visual aid for judging how market volatility changes: wider bands indicate a larger range between the bands, while narrower bands indicate a smaller one. It explains display configuration but does not specify a trading entry or exit rule, provide empirical testing, or claim predictive performance. Band width is therefore presented as a charting measure to support visual analysis, rather than a standalone strategy.

Key ideas

  • The indicator plots Bollinger Bands and calculates the distance between their upper and lower lines in pips.
  • Users can configure the bands’ calculation inputs and visual style.
  • A label shows the bandwidth on the main chart or in a selected sub-window.
  • The document presents band width as a way to visualize market volatility, without providing a tested trading rule.

Tags

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