Join free

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.

About 11 minutes to read. Free, no account.

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.

All three definitions
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.

Five closes, worked end to end
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.

A quieter window, the same average
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
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.

How much of a window can sit outside the bands
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.

The band outruns the breakout
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 one

Price 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
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.

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

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

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.

Come and watch the record being built

Crypto news as it breaks, the day's biggest movers, and free signals in the same format paid members get. No card, no account.

Join the free Telegram channel