# Bollinger Bands

> Bollinger Bands are a volatility envelope around a 20-period simple moving average, set two standard deviations above and below it, so the bands widen when price swings grow and tighten when it goes quiet.

Canonical: https://patternsradar.com/learn/bollinger-bands

John Bollinger's construction is a moving average that carries its own error bars: the middle band is the 20-period SMA, and the outer bands sit two standard deviations of price away on each side. Because the deviation is recomputed each bar, the envelope is self-adjusting — it balloons after wild sessions and contracts during quiet ones, so "unusual" is always defined against the stock's own recent behaviour rather than a fixed percentage.

Sift exposes the derived members that make the bands screenable. bb().pctb locates the close within the envelope — 0 at the lower band, 1 at the upper — and bb().width measures band separation as a fraction of the middle band. Width is the squeeze detector: readings under about 0.08 mark ranges compressed to the point where they rarely stay that way, the premise of every squeeze scan. A close beyond a band is a two-standard-deviation event by the stock's own standards, read as a breakout or a flush depending on trend.

The classic misreading is treating the bands as walls. In a strong trend price can ride the upper band for weeks — each session touching it, none reversing — so a band touch alone is not a fade signal, and the squeeze, for all its reliability at predicting that a move is coming, says nothing about direction. The statistical dressing also overstates the maths: daily returns are not normal, and price exceeds the two-sigma bands far more often than a textbook would allow.

Against Keltner channels, the nearest sibling, the difference is the volatility measure: Bollinger uses standard deviation of closes, which reacts sharply to single surprises, while Keltner uses ATR, which breathes more slowly. Bollinger bands flare on one wild bar; Keltner channels barely notice it — which is why squeeze traders often watch the two together.

## In Sift

Written as `bb().upper / .mid / .lower / .pctb / .width`. A working scan — stocks in a Bollinger squeeze while the long-term trend still points up:

```sift
where bb().width < 0.08 and close > sma(200)
```

1 of the 500 most-traded NSE stocks match today, as of 2026-08-21.

## Scans that use it

- [Bollinger band breakout](https://patternsradar.com/screener/bollinger-breakout.md): Close pushing above the upper band, with volume confirming.
- [Bollinger lower band bounce](https://patternsradar.com/screener/bb-lower-bounce.md): Price closing back inside the bands after a two-standard-deviation flush.
- [Bollinger squeeze](https://patternsradar.com/screener/squeeze.md): Bands within 8% of the middle — compressed ranges that usually resolve with a move.
- [Volatility contraction near highs](https://patternsradar.com/screener/volatility-contraction.md): Coiled within 5% of the 52-week high with Bollinger width under 0.08 — the VCP shape, as a scan.

## Common questions

### What does it mean when a stock touches the upper Bollinger band?

That price is two standard deviations above its own 20-day average — statistically stretched by its recent behaviour. But in a strong trend price rides the upper band for weeks, so a touch is not automatically a sell reading. Traders distinguish a first touch after a squeeze, often a breakout, from repeated touches inside an established trend, which are just strength.

### What is a Bollinger band squeeze?

A period when the bands pull unusually close together — bb().width dropping below roughly 0.08 — because price has gone quiet. Volatility mean-reverts more reliably than price does, so squeezes tend to precede directional moves. The squeeze says nothing about which direction; it says the range is unlikely to hold.

### What is %B in Bollinger bands?

A position reading: where the close sits within the envelope, 0 at the lower band, 1 at the upper, 0.5 on the middle line. It turns the visual band-touch into a filterable number — bb().pctb above 1 means a close beyond the upper band — and lets band position chain into any other condition in a scan.
