Bollinger Bands

Updated November 30, 2026 · Not part of TradingView's technical rating

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

TypeVolatility bands around a moving average
Created byJohn Bollinger, early 1980s
Standard settings20-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 ratingNo

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–5Days 6–10Days 11–15Days 16–20
48.2049.1050.4051.10
48.6049.6050.2051.30
48.4049.8050.7051.00
48.9049.5050.9051.60
49.3050.1050.6052.40
  1. Middle band. The closes add up to 1,001.70, so the 20-day average is 1,001.70 ÷ 20 = 50.085.
  2. 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.
  3. Variance. 24.666 ÷ 20 = 1.2333.
  4. Standard deviation. √1.2333 = 1.1105.
  5. Bands. Upper = 50.085 + 2 × 1.1105 = 52.306. Lower = 50.085 − 2 × 1.1105 = 47.864.
  6. %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.
  7. 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

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

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.