Bollinger Bands: Formula, Settings & Strategies

Is this price high or low? It sounds like a simple question, but the answer depends on the market. A ₹20 move is huge for a quiet stock and small for a volatile one. A fixed number can’t tell you what is “normal”.

Bollinger Bands solve this by drawing a moving “normal zone” around price. When the market is calm, the bands come close together. When it becomes volatile, they spread apart. So “high” and “low” are always judged against the market’s own recent behaviour.

In this guide you will learn the full formula with every step of the arithmetic, how to read the bands without falling into the most common traps, how to adjust the settings, three rule-based strategies, and where Bollinger Bands fail.

Bollinger Bands Quick Facts

FeatureDetail
CreatorJohn Bollinger
YearEarly 1980s
Indicator typeVolatility bands (overlay on the price chart)
Built onSimple moving average + standard deviation
Default settings20 periods, 2 standard deviations
Best marketsAny liquid market: stocks, indices, forex, crypto, commodities
Best timeframesAll; most commonly used from 15-minute to daily

Origin and History

Bollinger Bands were developed by John Bollinger, an American market analyst, in the early 1980s. He later explained the method in detail in his book Bollinger on Bollinger Bands (2001).

Before Bollinger Bands, many traders used fixed-percentage “envelopes” around a moving average, for example 3% above and below. The problem: 3% is too wide for a quiet market and too narrow for a volatile one. Bollinger’s idea was to let the market decide the width by using standard deviation, a statistical measure of how spread out prices are.

Bollinger also published a list of rules for using the bands. One important rule is that the default settings (20 and 2) are a starting point, not a requirement for every market.

Bollinger Bands® is a registered trademark of John Bollinger.

The Bollinger Bands Formula, Step by Step

Bollinger Bands have three lines:

Middle Band = SMA(Close, n)
Upper Band  = Middle Band + (k × Standard Deviation)
Lower Band  = Middle Band − (k × Standard Deviation)

Where:
– n = number of periods (default 20)
– k = number of standard deviations (default 2)
– SMA = simple moving average (the plain average of the last n closes)
– Standard deviation = how far, on average, the closes are spread out from their average

How standard deviation is calculated

1. Average      = sum of the n closes ÷ n
2. Deviation    = each close − Average
3. Squared      = Deviation × Deviation
4. Variance     = sum of the squared deviations ÷ n
5. Std deviation = √Variance

Population vs sample: Bollinger’s method divides by n (called the “population” standard deviation). Some spreadsheets and a few platforms divide by n − 1 (the “sample” standard deviation), which makes the bands slightly wider. This is one reason two platforms can show slightly different band values.

Worked example (20 periods, 2 standard deviations)

Here are 20 daily closes of a stock:

DayCloseDeviation (Close − 252.75)Squared
1248.2−4.5520.7025
2249.5−3.2510.5625
3250.1−2.657.0225
4249.0−3.7514.0625
5251.3−1.452.1025
6252.0−0.750.5625
7251.6−1.151.3225
8250.4−2.355.5225
9252.80.050.0025
10253.50.750.5625
11252.90.150.0225
12254.11.351.8225
13253.20.450.2025
14252.5−0.250.0625
15254.82.054.2025
16255.62.858.1225
17254.92.154.6225
18256.23.4511.9025
19255.42.657.0225
20257.04.2518.0625
Total5,055.00.00118.4700

Step 1: Middle band
– SMA = 5,055.0 ÷ 20 = 252.75

Step 2: Variance
– Variance = 118.47 ÷ 20 = 5.9235

Step 3: Standard deviation
– Standard deviation = √5.9235 = 2.4338

Step 4: Upper and lower bands
– 2 × 2.4338 = 4.8676
– Upper Band = 252.75 + 4.8676 = 257.62
– Lower Band = 252.75 − 4.8676 = 247.88

The band is 9.74 points wide. Today’s close (257.0) sits just below the upper band.

(With the sample method, n − 1 = 19, the standard deviation would be 2.4971 and the upper band 257.74, about 0.12 higher.)

%B and BandWidth: two numbers from the bands

Bollinger also defined two readings that turn the bands into numbers:

%B        = (Close − Lower Band) ÷ (Upper Band − Lower Band)
BandWidth = (Upper Band − Lower Band) ÷ Middle Band

From our example:
– %B = (257.0 − 247.88) ÷ (257.62 − 247.88) = 9.12 ÷ 9.74 = 0.94. A %B of 1 means price is at the upper band, 0.5 at the middle, 0 at the lower band. Above 1 or below 0 means price is outside the bands.
– BandWidth = 9.74 ÷ 252.75 = 0.0385, or 3.85%. This measures how wide the bands are compared with price. When BandWidth falls to an unusually low level, traders call it a squeeze. (Our Bollinger Band Squeeze guide covers this in full.)

How to Read Bollinger Bands

  • Price at the upper band means price is high relative to the last 20 bars. It does not automatically mean “sell”.
  • Price at the lower band means price is low relative to recent bars. It does not automatically mean “buy”.
  • Walking the band: in a strong trend, price can keep touching or closing near one band for many bars. This shows strength, not exhaustion.
  • Bands narrowing: volatility is falling. Quiet periods are often followed by bigger moves, but the bands don’t tell you the direction.
  • Bands widening: volatility is rising, usually during a strong move or after news.
  • The middle band: a 20-period average. In a healthy uptrend, pullbacks often hold near it; in a downtrend, rallies often stall near it.

The most important lesson: a band touch is information, not a signal. Bollinger himself recommends confirming with other tools.

Bollinger Bands Settings Deep Dive

ParameterDefaultRaise itLower it
Length (n)20Smoother middle band, slower bands, fewer touchesFaster bands that follow price closely, more touches
Std deviation (k)2Wider bands, price rarely closes outsideNarrower bands, more closes outside
SourceClose—— (rarely changed)

Bollinger’s own adjustment rule: if you change the length, adjust the standard deviation a little too, so the bands still contain a similar share of price. His published pairs are 10 periods with 1.9 and 50 periods with 2.1.

Starting points by trading style (to test, not proven best values):

Trading styleTypical timeframeLengthStd deviation
Scalping1–5 min101.9
Intraday5–15 min202
Swing1H–Daily202
PositionalDaily–Weekly502.1

Want to see these settings side by side? Our guide to the best Bollinger Bands settings compares 20/2, 10/1.9, 50/2.1 and the popular 10/1.5 on the same chart.

Bollinger Bands Trading Strategies

These are educational examples, not recommendations. Test any rule on your own market and timeframe first.

Strategy 1: Mean reversion in a range (with %B)

When a market is moving sideways, prices tend to swing between the bands.

  • Market condition: a clear sideways range; the middle band is flat. A trend filter such as a low ADX reading helps confirm it.
  • Long entry: %B closes below 0 (price closes under the lower band), then the next bar closes back inside the bands.
  • Stop-loss: below the lowest low of the move outside the band.
  • Exit: at the middle band (partial) or near the upper band.
  • Short entry: the mirror image at the upper band.
  • Fails when: the range breaks into a trend. Then price keeps “walking” the band against you, which is why the stop is essential.

Strategy 2: Trend continuation (walking the band)

In a strong trend, closes near the band show strength.

  • Market condition: the middle band is sloping clearly, and price has been closing in the upper half of the bands (%B above 0.5).
  • Long entry: after a pullback toward the middle band, enter when a candle closes back up and away from it.
  • Stop-loss: a close below the middle band, or below the pullback low.
  • Exit: trail the stop with the middle band; exit on a close below it.
  • Fails when: the trend is ending and the pullback becomes a reversal. Expect some small losses at turning points.

Strategy 3: W-bottoms and M-tops

Bollinger described these reversal patterns using the bands and %B.

  • W-bottom (long): price makes a first low outside or at the lower band. It rallies, then makes a second low that may be lower in price but stays inside the lower band (higher %B than the first low). This shows selling pressure is weakening.
  • Entry: when price breaks above the high between the two lows.
  • Stop-loss: below the second low.
  • Exit: at the upper band, or trail with the middle band.
  • M-top (short): the mirror image at the upper band.
  • Fails when: a strong trend resumes; not every double low is a W-bottom.

Confluence: What to Pair With Bollinger Bands

Pair withWhy it helps
RSIBollinger Bands show where price is relative to volatility; RSI shows momentum. A lower-band touch with RSI divergence is a stronger reversal clue than either alone.
VolumeA band break on rising volume is more likely to be a real move; on low volume, it is more likely to fail.
ADXTells you whether the market is trending or ranging, so you know whether to use Strategy 1 or Strategy 2.
Keltner ChannelsUses ATR instead of standard deviation. When Bollinger Bands move inside Keltner Channels, volatility is very low (the “TTM squeeze” idea). (See our Keltner Channel guide.)

Redundant pairings to avoid: moving average envelopes and Donchian channels also draw a “normal zone” around price. Adding them to Bollinger Bands mostly repeats the same information. And don’t pair Bollinger Bands with a second moving average of the same length — the middle band already is one.

Limitations and Common Mistakes

  1. Treating every band touch as a reversal. In trends, price can stay at a band for a long time. Selling every upper-band touch in an uptrend is one of the most common losing habits.
  2. The bands react after the move. Standard deviation is calculated from past prices, so the bands widen after a big candle, not before it.
  3. Outliers stretch the bands. One very large candle (for example, after results or news) can widen the bands for the next 20 bars, even if the market calms down.
  4. Assuming “95% of prices stay inside”. That idea comes from the normal distribution, but market prices don’t follow it neatly. Bollinger himself warns against making statistical assumptions from the bands.
  5. Changing length but not the multiplier. A 10-period band with 2 standard deviations is not the same as the default. Use Bollinger’s paired values (10/1.9, 50/2.1) as a guide.
  6. Using the bands alone. They tell you about volatility and relative price level, not direction. Combine them with a trend or momentum tool.

Frequently Asked Questions

What are the best Bollinger Bands settings?

The standard setting is 20 periods and 2 standard deviations, and it works as a starting point on most markets and timeframes. If you shorten or lengthen the period, Bollinger suggests 10 with 1.9 or 50 with 2.1. For a full comparison on a real chart, see our best Bollinger Bands settings guide.

Are Bollinger Bands good for intraday trading?

Yes, many intraday traders use them on 5–15 minute charts, mainly to judge whether price is stretched and whether volatility is rising or falling. On very short charts, expect more false band breaks.

What does it mean when price touches the upper Bollinger Band?

It means price is high compared with the last 20 bars. In a range, that can be a place where rallies stall. In a strong uptrend, it often shows strength. It is not a sell signal on its own.

What is %B in Bollinger Bands?

%B shows where the close is within the bands: 1 at the upper band, 0.5 at the middle, 0 at the lower band. Values above 1 or below 0 mean price closed outside the bands.

What is the difference between Bollinger Bands and Keltner Channels?

Bollinger Bands use standard deviation of closing prices, so they react quickly to big moves. Keltner Channels use ATR (Average True Range), so they are smoother. Traders often use them together to spot very low volatility.

Do Bollinger Bands repaint?

No. On closed bars, the values are fixed. On the current open bar, the bands move as price moves until the bar closes, which is normal for any indicator calculated on the close.

Keep Learning

Bollinger Bands are one of the best tools for understanding volatility. Next, learn how traders use the narrowing of the bands to prepare for breakouts in our Bollinger Band Squeeze guide, and compare them with the ATR-based Supertrend indicator. Compare all our tools for measuring risk in the Volatility Indicators guide.

Want practical indicator guides in your inbox? Join the IndicatorHQ newsletter. Subscribers will also get our free Indicator Settings Cheat Sheet when it launches.


How we checked this guide

  • Method: Formula and worked example verified in code
  • Chart: Real TradingView data, S&P 500 4-hour, at least 30 days old
  • Repainting: Does not repaint on closed bars

See how we test indicators →

Risk disclaimer: This article is for educational purposes only and is not investment advice. Trading in stocks, derivatives, forex and crypto involves a substantial risk of loss and is not suitable for everyone. Past behaviour of any indicator does not guarantee future results. Consider speaking to a SEBI-registered investment adviser (or a licensed adviser in your country) before making trading decisions. See our full Disclaimer.