guides /
Bollinger Bands
How are Bollinger Bands calculated?
Bollinger Bands are a 20-session average of the daily close with bands two population standard deviations above and below it. Lord of TA publishes the latest band state for each tracked name. These are descriptive states, not a buy or sell signal.
Published · Updated
The stored snapshot is /bollinger.json. Names in a squeeze, walking a band, or outside a band with the whole bar are listed at /bollinger. One symbol is /t/{symbol}.json under the bollinger object, and the same sentence is on /t/{symbol}. The close is split-adjusted and is not adjusted for dividends. Nothing on this page is a win rate.
Construction
Take the last 20 completed daily closes. The middle band is their simple average. The population standard deviation divides the sum of squared deviations from that average by 20, not by 19. The upper band is the middle plus 2 of those standard deviations. The lower band is the middle minus 2. A chart study that divides by 19 (a sample standard deviation) sits a little wider than these bands.
The terminal Bollinger overlay uses this same population divisor. /bollinger.json, /bollinger, the Bollinger block on a ticker page, and the chart overlay are the same bands. A study that still divides by 19 will not match them.
Why the defaults matter
20 sessions and 2 standard deviations are the settings a default daily chart already draws. Publishing that pair means a squeeze on this site is compression against the same window a reader is used to seeing. A shorter average flags ordinary quiet days. A longer one buries a real contraction in an old regime. Changing the multiplier rescales every %B and every BandWidth, so the thresholds below belong to 2, not to an arbitrary width.
%B and BandWidth
%B is (close - lower) / (upper - lower). It is 0 at the lower band, 0.5 at the middle, and 1 at the upper band. A close outside the bands is below 0 or above 1. When the upper and lower bands are equal, %B is left blank.
BandWidth is (upper - lower) / middle * 100. It is the band's width as a percent of the middle, so a $2 band on a $20 name and a $2 band on a $200 name are not treated as the same squeeze. BandWidth is blank when the middle band is 0.
The squeeze
A squeeze here means BandWidth is at a low point of its own trailing 126 sessions, about six months of daily bars. The percentile is 100 times the count of those 126 readings strictly below the current reading, divided by 125. The flag turns on at or below the 10th percentile. Ten is wide enough that a quiet tape still produces a list, and tight enough that an ordinary week does not fill the page. 126 sessions is long enough that one quiet week does not define the range.
The percentile uses only readings up to that bar. Adding a later session does not rewrite an earlier percentile. Until 126 finite BandWidth readings exist, the percentile is blank and the squeeze flag stays off.
A squeeze has no direction. Price can leave the band either way, or not leave it. A close outside a tight band can reverse on the next session. These flags do not separate a fakeout from a continuation. Share volume on the break adds weight: the feed's volume ratio is this session's volume divided by the average volume of the prior 20 sessions, excluding this session. A ratio near 1 is an ordinary bar.
A squeeze release is the combination the screener also lists: a squeeze on any of the last 5 sessions, including this one, and the latest close strictly outside a band. Five sessions is one trading week. The squeeze flag can still be on. This is not the site's separate squeeze-fire rank rule, which compares Bollinger Bands with Keltner Channels. Hit rates for that rule, when the tape has them, stay on the signal page. This guide does not restate them.
Mean reversion
A close outside the band is not, by itself, a reversal. The usual description is that a move back toward the middle is more interesting after a later close has returned inside the band. That is a description people use, not a rule this site scores.
The re-entry flag records only the mechanical part: the prior close was strictly outside that bar's bands, and the latest close is back on or inside the latest bands. It does not predict a trip to the middle. The rank panel has its own Bollinger bounce rules. Their hit rates, if a tape has enough firings, are on those signal pages and are not repeated here.
Walking the band
Walking the band is the name for a trend that keeps closing near the outer band while pullbacks hold the middle band. The outer band is not an automatic exit. A close through the middle band is the trail that says the walk has stopped.
The published flag is narrower than that story. It turns on only after three or more consecutive closes with %B at or above 0.95 (upper walk) or at or below 0.05 (lower walk), and only if none of those closes is on the far side of that bar's middle band. Two closes are not a walk. A pullback that leaves %B between 0.05 and 0.95 ends the count, even when the close is still on the trend side of the middle band. A close exactly on the middle band is not a cross through it, but it also is not an outer-band close, so it ends the streak.
Band escape
A band escape is a bar whose entire high-low range sits outside a band: the low is strictly above the upper band, or the high is strictly below the lower band. A wick that tags the band is not an escape. A close outside the band with part of the bar still inside is not an escape.
The flag marks an extended move. It is not a guaranteed reversal, and it is not a signal to fade the bar. Touching the band, or closing beyond it while the range still overlaps the band, leaves the flag off.
Confluence
These states get more interesting next to something else already published here, and they stay descriptions when you stack them. A squeeze release carries more weight when that session's volume ratio is elevated, when RSI or MACD is pointing the same way, or when the close leaves a volume-profile shelf such as the point of control or a value-area edge. None of those turns a band state into a buy or a sell.
Volume profile is /guides/volume-profile and /volume-profile. RSI(14) cross 30 is /signals/rsi-14-cross-30. MACD bullish cross is /signals/macd-bullish-cross. The Bollinger bounce rules scored on the rank panel are /signals/bb-lower-band-bounce and /signals/bb-upper-band-reject. The Keltner squeeze-fire rules are /signals/squeeze-fire-bullish and /signals/squeeze-fire-bearish. Read those pages for the rule definition. This guide does not quote a win rate.
FAQ
What settings do the published Bollinger Bands use?
A 20-session simple average of the daily close, plus and minus 2 population standard deviations of those closes. The divisor is 20, not 19. The close is split-adjusted and is not adjusted for dividends.
What is a Bollinger squeeze on this site?
BandWidth at or below the 10th percentile of that name's trailing 126 sessions. The flag has no direction. A close outside the band can be a fakeout. Volume on that bar is a separate ratio against the prior 20 sessions.
Does a close outside the band mean price will reverse?
No. A later close back inside the band is what the re-entry flag records. It is not a forecast that price will reach the middle band.
What is walking the band?
Three or more consecutive closes with %B at or above 0.95 or at or below 0.05, without a close through the middle band. The outer band is not an automatic exit. A pullback that leaves that %B zone ends the published walk.
What is a band escape?
The whole bar is outside the band: low above the upper band, or high below the lower band. It flags an extended move. It is not a guaranteed reversal.
Are these buy or sell signals?
No. Squeezes, releases, walks, escapes, and re-entries describe completed daily bars. They are not a buy or sell signal, not a forecast, and not trade advice.
Live endpoints
- Bollinger JSON https://lordofta.com/bollinger.json
- Bollinger screener https://lordofta.com/bollinger
- SPY study JSON https://lordofta.com/t/spy.json
- Bollinger guide https://lordofta.com/guides/bollinger-bands
- Volume profile guide https://lordofta.com/guides/volume-profile
- Volume profile https://lordofta.com/volume-profile
- RSI(14) cross 30 https://lordofta.com/signals/rsi-14-cross-30
- MACD bullish cross https://lordofta.com/signals/macd-bullish-cross
Plain text: /guides/bollinger-bands.md.
Descriptive research on daily bars. Not a forecast and not trade advice.