Skip to content
All library documents

Bollinger Bands Box for Displaying Closed Band Values

Article MQL5 code base

Summary

BollingerBands_Box is a chart display utility that shows closed values of the Bollinger Bands indicator using colored rectangles and background fills. Its inputs let users choose the calculation timeframe, bar number, period, standard deviation, applied price, and horizontal shift. The default configuration uses daily data, a period of 20, a standard deviation of 2.0001, and closing prices, though these settings can be changed.

The display can add labels for the upper, middle, and lower band prices, and the user can set the label colors. Additional controls determine how many bars the rectangles cover and how far they extend to the right of the current bar. The document describes visualization and configuration rather than a trading method: it gives no rules for acting on band touches, squeezes, or crossings, and offers no testing or performance evidence. The boxes make band levels easier to inspect, but do not establish that any particular setting or signal is predictive.

Key ideas

  • The indicator visualizes closed Bollinger Band values with colored rectangles and background fills.
  • Users can set the timeframe, lookback period, standard deviation, applied price, and bar shift.
  • Optional labels show prices for the upper, middle, and lower bands.
  • Rectangle length and rightward extension can be configured for chart display.
  • The document gives no trading rules or evidence that the visualization predicts price movements.

Tags

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