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
| Name | Value | Default | Allowed | What it does |
|---|---|---|---|---|
| period | 20 | 2 … 5000 usual 5–200 | Bars in the moving average and in the standard deviation. | |
| stdDev | 2 | 0.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
| Middle | The simple moving average. |
| Upper | Middle plus stdDev standard deviations. |
| Lower | Middle minus stdDev standard deviations. |
Drawn as one shaded band: the middle line with the upper and lower edges.