Skip to main content
Studies · Trend

Bollinger Bands

bollinger · Bollinger Bands — an SMA with bands at ±k standard deviations

Drawn over priceReads one column (close here)
Hover the chart to read values · practice data: a seeded random walk with no overnight gaps

What it measures

A moving average with a band above and below it, each a set number of standard deviations away. Because the band width comes from recent volatility, the bands widen when the market is moving hard and pinch together when it goes quiet.

How traders use it

  • Volatility at a glance: very narrow bands (a "squeeze") often come before a large move, though not which way.
  • Mean reversion: in a sideways market, touches of the outer band are faded back toward the middle.
  • Trend strength: in a strong trend price can "walk the band", closing at or outside it bar after bar. That is strength, not an automatic sell.
  • Two companion studies turn the bands into numbers: BandWidth (how wide) and %B (where price sits inside them).

Parameters

NameValueDefaultAllowedWhat it does
period202 … 5000
usual 5–200
Bars in the moving average and in the standard deviation.
stdDev20.1 … 10
usual 1–3
How many standard deviations the bands sit from the middle. 2 is the convention, and keeps most closes inside the bands.

Outputs

MiddleThe simple moving average.
UpperMiddle plus stdDev standard deviations.
LowerMiddle minus stdDev standard deviations.

Drawn as one shaded band: the middle line with the upper and lower edges.