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.
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 and 1 at the upper. 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 and none reversing, so a band touch alone is not a fade signal. 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; Keltner uses ATR, which breathes more slowly. Bollinger bands flare on one wild bar where 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:
where bb().width < 0.08 and close > sma(200)1
of the 500 most-traded NSE stocks match today, as of 6 Oct 2026
Scans that use it
Prebuilt scans in the library whose query reads this value — each with a hit-rate replay over the last 250 sessions.
Bollinger band breakout
A close above the upper Bollinger band with volume 1.5 times its average.
Bollinger lower band bounce
Price closing back inside the bands after a two-standard-deviation flush.
Bollinger squeeze
Bollinger width under 0.08 in a stock above its 200-day average. Compressed ranges tend to resolve.
Volatility contraction near highs
Within 5% of the 52-week high, Bollinger width under 0.08, above the 200-day. The VCP shape written as a query.
Common questions
What does it mean when a stock touches the upper Bollinger band?
Price is two standard deviations above its own 20-day average, statistically stretched by its recent behaviour. 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, with 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 the range is unlikely to hold and says nothing about which direction.
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, so bb().pctb above 1 means a close beyond the upper band, and band position can chain into any other condition in a scan.