Indicators, and what the readings mean
Bollinger Bands: a mean, a standard deviation, and why a touch is not a signal
Bollinger Bands are a moving average with a measure of spread drawn either side of it. The arithmetic is three lines long, and it rules out the reading almost everybody makes.
The three lines, and where they come from
The middle band is an ordinary simple moving average, 20 periods by convention. The outer bands sit a number of standard deviations above and below it - two, by convention - where the standard deviation is computed from the same 20 closes the average was computed from.
middle = SMA(N) of the closes upper = middle + k times the standard deviation lower = middle - k times the standard deviation conventionally N = 20 and k = 2
A standard deviation is one number saying how spread out a set of values is: take each value’s distance from the mean, square those distances, average them, take the square root. Five closes are enough to do it by hand.
closes 98, 102, 104, 106, 110 sum 520 mean = 520 / 5 = 104 distances -6, -2, 0, +2, +6 squared 36, 4, 0, 4, 36 sum = 80 average of those 80 / 5 = 16 standard deviation square root of 16 = 4.00 upper = 104 + 2 times 4 = 112 lower = 104 - 2 times 4 = 96
That is the entire indicator. Note what it is made of: a mean and a spread, both measured on the same window of past closes. There is no input from anywhere else - not from volume, not from the size of the bars, not from what happened before the window began.
Why the bands widen and narrow
Keep the same mean and tighten the closes around it. The middle band does not move at all; the outer bands come in.
closes 101, 103, 104, 105, 107 sum 520 mean = 104 (unchanged) distances -3, -1, 0, +1, +3 squared 9, 1, 0, 1, 9 sum = 20 average of those 20 / 5 = 4 standard deviation square root of 4 = 2.00 upper = 108 lower = 100 width = 8 the first window: width = 16
Half the spread, half the width, identical middle. So the band width is a measurement of how scattered the recent closes were and nothing else. Expressed against the middle band it has a name, bandwidth, and it is readable across coins because the price units cancel:
bandwidth = (upper - lower) / middle busy window 16 / 104 = 15.4% quiet window 8 / 104 = 7.7%
What a touch of the band does and does not mean
The common reading is that price at the upper band is stretched and due to come back. Here is why the arithmetic does not support it.
First, a band touch is a routine event by construction, not a rare one. The bands are placed using the spread of the very closes being measured, so some of those closes have to sit near the edges. There is a hard bound on how many: for any set of numbers at all, no more than one in k squared of them can be further than k standard deviations from the mean.
at k = 2 at most 1 / 4 of the window = 5 closes in 20 at k = 3 at most 1 / 9 of the window = 2 closes in 20 a bound, not a frequency - usually far fewer, never more
Second, and this is the part worth ten minutes of anyone’s time: a new extreme moves the band it is being measured against. A big up close raises the mean and increases the spread, so the upper band runs away from price at the same moment price runs at it. Watch it happen with the first window above - 98 drops out, a close of 116 arrives.
before closes 98, 102, 104, 106, 110
mean 104.00 sd 4.00 upper = 112.00
after closes 102, 104, 106, 110, 116
sum 538 mean = 107.60
distances -5.6, -3.6, -1.6, +2.4, +8.4
squared 31.36, 12.96, 2.56, 5.76, 70.56 sum = 123.20
123.20 / 5 = 24.64 sd = 4.96
upper = 107.60 + 9.93 = 117.53
the close of 116 is 4 points ABOVE the old upper band
and 1.53 points BELOW the new onePrice made a decisive new high, cleared the old upper band by four points, and finished the bar inside the bands. Anyone reading "a close outside the band" as the event has just watched the event disappear into the indicator’s own denominator.
Third, in a sustained trend price walks along a band for bar after bar. That is not a malfunction - it is what a one-sided window looks like when you measure its own spread. The same structural trap as a high RSI reading, for a related reason: see RSI.
Percent-b, and the squeeze
Two derived readings are worth knowing because they are just the bands restated. Percent-b says where price sits between the bands, as a fraction: 0 is the lower band, 1 is the upper, 0.5 is the middle average exactly.
percent-b = (price - lower) / (upper - lower) price 110, upper 112, lower 96 (110 - 96) / (112 - 96) = 14 / 16 = 0.875
The squeeze is the other one: bandwidth falling to the low end of where it has recently been, which means the last 20 closes clustered tightly. It is a true statement about a quiet window, and it is commonly sold as a prediction that a large move is coming. Be exact about what it can carry: a narrow band says the recent past was quiet. It contains no information about direction at all, because both bands narrowed symmetrically - there is nothing in the arithmetic that could point one way.
Settings, and the two places platforms disagree
Twenty periods and two standard deviations are Bollinger’s own defaults for a daily stock chart. Shorter windows react faster and touch more often; a larger k makes touches rarer by definition, because you moved the line. Neither change makes the indicator earlier, and testing settings until one looks good on the chart in front of you is the curve fitting the moving averages lesson warns about.
- Population or sample standard deviation. Bollinger divides the summed squares by N; some platforms divide by N - 1. For N = 20 that makes the bands wider by the square root of 20/19, which is 1.026 - about 2.6%. Visible on a chart, irrelevant to any sane decision.
- Closes or whole bars. The bands are built from closes, so a wick can poke outside a band while the close that defines the band never left. "Price touched the band" and "price closed outside the band" are different events, and only the second one is in the same units as the calculation.
And as with any average, the lines are provisional until the candle closes. Mid-bar, both the mean and the spread are being computed from a close that has not happened yet.
What Bollinger Bands cannot do
- They cannot give you a level. All three lines are recomputed every bar from a sliding window. A prior high sits still; a band does not.
- They cannot tell you a move is finished. Overextension and strength produce the identical reading, because the only input is the spread of recent closes.
- They cannot tell you which way a squeeze resolves. The construction is symmetric. Any directional claim is coming from somewhere else.
- They cannot survive being judged by eye. Scrolling a chart and noticing the touches that reversed is not a measurement - you were also deciding what counted as a touch while you looked.
The defensible use is as a spread meter: one glance tells you whether this market has been moving a lot or a little lately, and roughly where in that spread the current price sits. That is real context, and it is not a reason to enter, exit or move a stop. See the risk disclaimer.
The terms, defined
- Middle band
- A simple moving average of the closes, 20 periods by convention. The same object the moving-averages lesson describes.
- Standard deviation
- One number for how scattered a set of values is: the square root of the average squared distance from their mean.
- Upper / lower band
- The middle band plus and minus k standard deviations, k = 2 by convention. Both are recomputed every bar.
- Bandwidth
- The distance between the bands divided by the middle band, as a percent. The price units cancel, so it is comparable between coins.
- Percent-b
- Where price sits between the bands, with 0 at the lower band and 1 at the upper. A restatement of the bands, not extra information.
- Squeeze
- Bandwidth falling to the low end of its recent range, which means the last N closes clustered tightly. A statement about the past, with no direction in it.
What this means in practice
- Say what the bands are before reading them: a mean of the last N closes, plus and minus a spread measured on those same closes.
- Read bandwidth, not band position, when you want to know whether this market is busy or quiet - and read it as a percent so it means something across coins.
- Never treat a band touch as a reversal. A touch is an ordinary event in the window that defined the band, and in a trend it repeats for weeks.
- When price pushes through a band, recompute before concluding anything - the move itself lifts the mean and widens the spread.
- Distinguish a wick outside a band from a close outside it. Only the close is in the same units as the calculation.
- Treat a squeeze as "it has been quiet", never as "a move is coming, and upward".
Nothing in this lesson is financial advice or an instruction to trade. See the risk disclaimer. We never recommend a leverage setting - that decision is yours.