Bollinger Bands

Volatility-based bands for mean reversion and band escapes.

Bollinger Bands enclose the price with two standard deviation levels around a moving average. They contract when volatility drops and widen when it rises.

Escape

A single alert, Escape, covers two forms, evaluated at the candle close: the candle’s entire body (open and close) is outside the band while the wick still touches the band; or the entire candle, wicks included, is outside the band.

Parameters

Median
20-period SMA
Standard deviation
2.0
Timeframes
M5 to D1

Module alerts

Band touch

Real-time approach or touch of the upper or lower band.

Escape

At the close, the candle’s body, or the entire candle, is outside a band.

Calculation

Upper band = SMA(20) + (2 × SD). Lower band = SMA(20) − (2 × SD). Touch alerts use real-time price, while escape alerts wait for the candle close.

Notes

  • Real-time touches follow the standard proximity logic.
  • The approach distance is set in 4 steps — Very close, Close, Far, Wide — expressed in ticks, specific to each asset.