Bollinger Bands
Bollinger Bands are three lines drawn around the price: a moving average in the middle and two bands a set number of standard deviations above and below it. Standard deviation measures how widely prices have been scattered around their average, so the bands widen when prices swing more and narrow when they calm down. John Bollinger created them in the early 1980s to show volatility changing over time.
Bollinger Bands are not one of the 26 indicators in TradingView’s technical rating. They appear on this site’s charts because so many traders use them alongside the rated indicators.
At a glance
| Type | Volatility bands around a moving average |
| Created by | John Bollinger, early 1980s |
| Standard settings | 20-period simple moving average, bands 2 standard deviations away |
| Related measures | %B (where the price sits within the bands) and BandWidth (how wide they are) |
| In TradingView’s rating | No |
How they’re calculated
Middle band = 20-period simple moving average of the close
Upper band = middle band + 2 × standard deviation of the last 20 closes
Lower band = middle band − 2 × standard deviation of the last 20 closes
The standard deviation is found in four steps: subtract the average from each of the 20 closes, square each difference, average the squares, and take the square root. This page divides by 20 (the population standard deviation). Dividing by 19, the sample formula, would make the bands slightly wider.
Two measures come from the bands. TradingView’s help pages define them as:
%B = (price − lower band) ÷ (upper band − lower band)
BandWidth = (upper band − lower band) ÷ middle band × 100
%B is 1 when the price is on the upper band, 0 on the lower band and 0.5 on the middle band. It goes above 1 or below 0 when the price closes outside the bands.
Worked example: 20 days of closes
A hypothetical stock closes as follows over 20 days, rising gently and then jumping on day 20:
| Days 1–5 | Days 6–10 | Days 11–15 | Days 16–20 |
|---|---|---|---|
| 48.20 | 49.10 | 50.40 | 51.10 |
| 48.60 | 49.60 | 50.20 | 51.30 |
| 48.40 | 49.80 | 50.70 | 51.00 |
| 48.90 | 49.50 | 50.90 | 51.60 |
| 49.30 | 50.10 | 50.60 | 52.40 |
- Middle band. The closes add up to 1,001.70, so the 20-day average is 1,001.70 ÷ 20 = 50.085.
- Squared differences. Subtract 50.085 from each close and square the result. For day 1: (48.20 − 50.085)² = (−1.885)² = 3.553. For day 20: (52.40 − 50.085)² = 2.315² = 5.359. The 20 squares add up to 24.666.
- Variance. 24.666 ÷ 20 = 1.2333.
- Standard deviation. √1.2333 = 1.1105.
- Bands. Upper = 50.085 + 2 × 1.1105 = 52.306. Lower = 50.085 − 2 × 1.1105 = 47.864.
- %B on day 20. (52.40 − 47.864) ÷ (52.306 − 47.864) = 4.536 ÷ 4.442 = 1.02, so the close is just above the upper band.
- BandWidth. (52.306 − 47.864) ÷ 50.085 × 100 = 8.87.
Day 20’s jump took the close outside the upper band. That doesn’t by itself say what happens next: it says the move was large compared with the past 20 days.
How traders read Bollinger Bands
- A relative definition of high and low. TradingView’s help page notes that prices are almost always within the bands. When prices move to or through the upper band, many traders see the market as overbought; at or through the lower band, as oversold.
- Squeeze and expansion. Volatility tends to run in cycles: quiet periods, when the bands narrow, are typically followed by expansion, when they widen as prices move. A low BandWidth compared with its own history is called a squeeze, and some traders watch for a breakout from it.
- Walking the band. In a strong trend, closes can stay near one band for many days. Treating every touch of the upper band as a sell signal fails in those trends.
- Return to the middle. After a sharp move, prices often drift back toward the middle band, the 20-day average.
- Combined with other tools. TradingView’s help page describes pairing the bands with trend lines and other indicators rather than using them alone.
Settings and variations
- Length and width. 20 periods and 2 standard deviations are the standard. Shorter lengths make the bands react faster; wider multipliers (such as 2.5) put fewer closes outside them.
- %B and BandWidth as separate indicators. TradingView offers both as their own indicators, which helps when comparing volatility over time. TradingView’s help page notes that what counts as narrow differs between instruments and timeframes, so BandWidth is best compared with its own history.
Limitations
- Not a buy or sell rule by itself. A close outside a band shows an unusually large move, not its direction from here.
- Standard deviation assumes a typical spread of prices. Markets have more extreme days than that assumption implies, so closes outside the bands happen more often than the textbook math suggests.
- They lag like the moving average they’re built on.
See it on a live chart
This market's chart has one value per day, with no daily high or low, so it draws as a line and these indicators, which need highs and lows, aren't shown on it.
Bollinger Bands (20, 2) on daily candles. The legend shows the middle band, then the upper and lower bands. Notice how the bands widen after sharp moves and narrow in quiet stretches.
For TradingView's current rating of any market, with this indicator among the 26, see the market analysis page or the technical signals for all markets.
Sources
- TradingView, Bollinger Bands (BB), read Nov. 30, 2026
- TradingView, Bollinger Bands %B, read Nov. 30, 2026
- TradingView, Bollinger BandWidth (BBW), read Nov. 30, 2026
- TradingView, Technical Ratings (Bollinger Bands are not among its 26 indicators), read Nov. 30, 2026
This page explains how an indicator is calculated and how traders commonly read it. The worked examples use hypothetical prices. Nothing here is a recommendation to buy or sell any investment. This content is for informational purposes only and does not constitute financial advice. Consult a qualified financial advisor before making investment or financial decisions.