Our journal app is in pre-release. If you notice a problem, please contact us.

Home › Articles › Bollinger Bands explained: the math, and a common myth

Article

Bollinger Bands explained: the math, and a common myth

Price touched the upper band, so you sold because it had "gone too far". Then price kept climbing along the band. Bollinger Bands are lines drawn from how much past prices have varied. This article shows how they are calculated, why their width changes, and a common misunderstanding, with a chart and simple math. It does not tell you whether to use them as a trade signal.

Published 13 Oct 2026By Kenji Okumura, Representative, Tiltnote (has traded forex)

In short

Bollinger Bands are a moving average in the middle, with lines two "standard deviations" (a measure of how spread out prices are) above and below. Bigger moves widen the band; smaller moves narrow it. Touching a band is not necessarily a sign of a reversal.

How Bollinger Bands are calculated

The MT5 help calculates Bollinger Bands like this.[1]

Middle line = SMA (simple moving average, 20) of close
Upper line = middle line + 2 × standard deviation
Lower line = middle line − 2 × standard deviation

The standard deviation is a number for how far the last 20 closes are spread out around their average. The more spread out those 20 prices are, the bigger the standard deviation and the wider the band. The period (20) and multiplier (2) can be changed in the settings. The exact way the standard deviation is calculated (what it divides by) can differ a little between platforms (MT5 divides by the number of bars, 20), so the same settings can give slightly different lines.

Why the band widens and narrows

Price with a 20-period SMA and lines 2 standard deviations above and below. Where price moves little, the band narrows. In a strong rise, price closes above the upper band again and again while it keeps rising.
A made-up example. Where price moves little, the band is narrow. In the strong rise, candles close above the upper band again and again (red dots) while price keeps rising; there were 11 such bars in this example.

When price moves little, as on the left of the chart, the standard deviation is small and the band is narrow. When price starts to move a lot, the standard deviation grows and the band widens. A narrow band means "recent moves were small". It does not tell you which way price will move next.

Touching a band does not always mean a reversal

You may read that "about 95% of prices stay within the ±2 lines". That figure comes from assuming prices follow a normal distribution (a neat bell-shaped spread). Real price moves may not follow that shape, and the lines are drawn from the past 20 bars, so they do not tell you the chance that future prices will stay inside.

In a strong rise, as from the middle of the chart onward, bars can close above the upper band again and again while price keeps rising. Treating a touch of the upper band as "gone too far", or a touch of the lower band as "oversold", can mean trading against a strong move. Like other indicators, the bands are calculated from the past and lag behind price (see why indicators lag).

Check how you use them (you decide)

This article does not decide whether to use Bollinger Bands, or which settings or approach to use. If you use them, decide these first and log them, so you can see later how they worked for you:

The trading stats calculator turns a profit and loss list into win rate, average P&L and longest losing streak. With few trades, the numbers can swing a lot. For other indicators, see how common indicators work, RSI explained and MACD explained.

Sources

  1. MetaQuotes. Bollinger Bands (MetaTrader 5 Help). https://www.metatrader5.com/en/terminal/help/indicators/trend_indicators/bb

Tools for this article

Tag the trades you took on the bands.

Tiltnote is a trading journal you can use free with manual entries. On every trade you can log your strategy name, how you felt, whether you kept your rules, and a note. Put the settings in the strategy name, like "BB 20/2", and you can look back at those trades later.

Try Tiltnote free →Opens the Tiltnote web app. On the free plan, analysis and history show your most recent 14 days (older records are kept and unlock on the paid plan).

More articles

SMA vs EMA: what is the difference?RSI explained: the math and what "overbought" meansATR explained: true range, and what ATR can and cannot tell youStochastic oscillator explained: %K, %D, and the 80 and 20 linesWhy a backtest can show an edge that isn't thereHow far can you trust your win rate?Articles →

Feedback on this page

Anything missing, unclear, or a tool you would like? Tell us in any language.

Numbers you entered in a tool are not sent. Please do not include account numbers or passwords. Privacy details

This article is general information. It is not investment advice or a recommendation to make any trade.

Updated 20 Oct 2026 · Run by Kenji Okumura, Representative, Tiltnote · About this site