Senzoukria · Indicators

Bollinger Indicator: Formula, Settings and How to Read It

Bollinger Bands plot a simple moving average of closes with an upper and a lower band set a chosen number of standard deviations away from it. The bands widen when closes are dispersed around their average and narrow when they cluster near it.

Updated September 2026First published 17 September 2026

On this page
  1. What Bollinger measures
  2. The formula, as implemented
  3. How to read it
  4. Parameters and defaults
  5. What it does not show
  6. Related indicators
  7. This page in other languages
  8. Frequently asked questions

Bollinger — Averages & volatility, on the price chart.

What Bollinger measures

The basis is the simple moving average of the last N closes. The bands are that basis plus and minus k times the standard deviation of the same window, computed with the population convention: the sum of squared deviations is divided by N, not by N - 1. That choice matches how TradingView and ATAS compute Bollinger Bands, and it makes the bands very slightly narrower than a sample standard deviation would. The whole construction uses closes only, so movement that occurred between two closes reaches the bands only through the closes it produced.

The formula, as implemented

This is not how the indicator is usually defined elsewhere — it is what the shipped code computes, documented next to the implementation:

True Range et ATR de Wilder : TR[0] = high − low ; TR[i] = max(high−low, |high−closeₚ|, |low−closeₚ|) ATR[N−1] = moyenne des N premiers TR ; ATR[i] = (ATR[i−1]·(N−1)+TR[i])/N Warm-up (< N barres) → null. Défaut N=14 (Wilder, 1978). */ export function atrSeries( bars: readonly FootprintBar[], period: number, ): Array<number | null> { const n = Math.max(1, Math.floor(period)); const out: Array<number | null> = new Array(bars.length).fill(null); if (bars.length < n) return out; const tr: number[] = new Array(bars.length); for (let i = 0; i < bars.length; i++) { const b = bars[i]; if (i === 0) { tr[i] = b.high - b.low; } else { const pc = bars[i - 1].close; tr[i] = Math.max(b.high - b.low, Math.abs(b.high - pc), Math.abs(b.low - pc)); } } let atr = 0; for (let i = 0; i < n; i++) atr += tr[i]; atr /= n; out[n - 1] = atr; for (let i = n; i < bars.length; i++) { atr = (atr * (n - 1) + tr[i]) / n; out[i] = atr; } return out; } const atr: SeriesIndicatorDef = { id: "atr", label: "ATR (Wilder)", group: "Averages & volatility", target: "pane", params: [ { key: "period", label: "Period", type: "number", default: 14, min: 1, max: 200, step: 1 }, { key: "color", label: "Color", type: "color", default: C.gray }, ], compute(bars, params) { const n = Math.max(1, Math.floor(numParam(params, "period", 14))); return [lineOut(toPoints(bars, atrSeries(bars, n)), strParam(params, "color", C.gray))]; }, }; /** Bollinger sur close : basis = SMA_N, bandes = basis ± k·σ où σ est l'écart-type de POPULATION de la fenêtre (÷N, pas ÷(N−1) — la convention TradingView/ATAS pour les BB). Défauts N=20, k=2 (Bollinger, 1983).

How to read it

  • Band width is the reading: contracting bands mean closes have been packed close to their average recently, expanding bands mean they have not.
  • A close outside a band is a statement about that close relative to the window, not a signal; in a directional move, closes can stay outside the band for a long sequence of bars.
  • When price walks along one band, the basis is usually sloping in the same direction, so treat the pair together rather than the band alone.
  • A return inside the bands after an excursion tells you dispersion has fallen back, which can happen with price still continuing in the same direction.
  • The basis is a simple average, so it turns after price does; a basis cross is not an early event.

Parameters and defaults

The defaults are period 20 and a multiplier of 2.0, the pair Bollinger published in 1983. Raising the period makes both the basis and the width slower and less sensitive to a single bar. Raising the multiplier scales the bands proportionally without changing when they widen or narrow. The multiplier accepts 0.5 to 5 in steps of 0.1, and the period 2 to 200.

Bollinger — parameters exposed in the app, with the values it ships with.
ParameterTypeDefaultRange
Periodnumber202 – 200
σ multipliernumber20.5 – 5

What it does not show

The bands describe the dispersion of past closes and nothing else. They carry no information about who traded at those prices, so a squeeze that resolves through absorption and one that resolves through one-sided aggression look identical on the chart. Nothing in the calculation assumes a particular distribution of returns, so the share of observations that a normal distribution would place inside two standard deviations should not be expected to hold on market data. Session gaps are invisible, since only closes enter the sum. And after one very large bar the width stays elevated for the rest of the window, even if the market has gone quiet again.

  • SMA — Averages & volatility
  • EMA — Averages & volatility
  • WMA — Averages & volatility
  • Hull MA — Averages & volatility
  • ATR (Wilder) — Averages & volatility
  • Keltner — Averages & volatility

Browse all indicators

This page in other languages

Frequently asked questions

Do Bollinger Bands use population or sample standard deviation?
This implementation divides the sum of squared deviations by N, the population convention, which is what TradingView and ATAS use for Bollinger Bands. A sample standard deviation, dividing by N - 1, would produce marginally wider bands. The difference shrinks as the period grows and is barely visible at the default period of 20.
What does a Bollinger squeeze mean?
A squeeze is a stretch where the two bands come close together, which happens when recent closes have been tightly grouped around their moving average. It describes the market that just traded; it indicates neither the direction of the move that follows nor when it starts.
Do the bands see gaps between sessions?
No. Only closing prices enter the average and the standard deviation, so a gap changes the bands only through the closes that follow it. A channel built on true range, such as Keltner, includes the distance from the previous close and reacts to the gap itself.
NEXT

Keep reading