VolatilityExpert Curated · Playbook

BB

Bollinger Bands

A volatility envelope built from a moving average and ±2 standard deviations, expanding and contracting as volatility changes.

Bollinger Bands plot a 20-period SMA with upper and lower bands at ±2 standard deviations of price. The bands widen during volatile moves and squeeze during calm periods. Roughly 95% of bars close inside the bands. Default settings: length 20, multiplier 2.

Bollinger Bands plot a 20-period simple moving average as the middle band, with upper and lower bands at ±2 standard deviations of price. The bands widen during volatile moves and squeeze during calm periods — their width itself becomes a volatility signal.

Prices spend roughly 95% of the time inside the bands (by the properties of a normal distribution), so band touches aren't trade signals on their own — they're context. The most reliable setups combine band behaviour with confirmation: squeeze breakouts, lower-band touches plus bullish candles, or middle-band reclaims.

Entry ideas

How do I enter trades using BB?

03ideas
01Entry idea

Lower band bounce with confirmation

A mean-reversion long that uses the bands for context and a candle for the trigger.

02Entry idea

Squeeze breakout

A volatility-ignition entry that rides expansion out of a tight-band coil.

03Entry idea

Middle band reclaim

A trend-continuation long that buys when the short-term pullback exhausts.

Exit ideas

When should I exit a BB trade?

03ideas
01Exit idea

Upper band tag exit

A statistical-stretch exit that locks gains when the move is 2 std dev extended.

02Exit idea

Middle-band revert

A patient mean-reversion exit that takes profit at the statistical expected value.

03Exit idea

Post-breakout squeeze collapse

A volatility-fade exit that closes when the expansion fuelling the trade dies out.

Utilities

What else is BB good for?

02ideas
01Utility

Low-volatility regime filter

A regime filter that only fires when bands are compressed — squeeze conditions ripe for breakouts.

02Utility

Band-width compression trigger

A timing filter that fires only when current volatility has compressed to a multi-bar low.

How do I read BB?

  • Price near the upper band = stretched upside. Statistically about 2.5% of bars close above; not a sell signal alone, but elevated mean-reversion risk.
  • Price near the lower band = stretched downside. Same statistical framing applies in reverse.
  • The middle band (20 SMA) acts as dynamic support in uptrends, resistance in downtrends — a useful regime gauge.
  • Squeeze: when band-width contracts to a multi-bar low, volatility is coiled. Often precedes an expansion move in either direction.
  • Walking the band: in strong trends, price can ride the upper or lower band for many bars without reverting. Treat sustained band-touching as a strength signal, not weakness.
  • Band-width itself is a volatility regime indicator — useful even without trading the bands directly.

What are the default BB settings?

ParameterDefaultWhen to adjust
Length20John Bollinger's original setting. Reduce to 10 for very short-term sensitivity; raise to 50 for weekly/macro context.
Multiplier (std dev)2Captures roughly 95% of price action under a normal distribution. Drop to 1.5 for tighter bands (more touches); raise to 2.5 for fewer, more meaningful touches.
SourceCloseMost common. Some traders use HLC3 to smooth wick noise on volatile instruments.
MA typeSMABollinger's original used a simple moving average. Some modern variants use EMA for responsiveness — produces different bands.

How do I code BB in Pine Script?

//@version=5
indicator("Bollinger Bands Example", overlay=true)

length = input.int(20,  title="Length",     minval=2)
mult   = input.float(2.0, title="Multiplier", minval=0.1, step=0.1)
src    = input.source(close, title="Source")

[middle, upper, lower] = ta.bb(src, length, mult)

p_upper = plot(upper,  title="Upper",  color=color.blue)
p_lower = plot(lower,  title="Lower",  color=color.blue)
plot(middle, title="Middle (SMA 20)", color=color.orange)
fill(p_upper, p_lower, color=color.new(color.blue, 95))

Pine's ta.bb() returns the middle band, upper, and lower in one call — saves you from computing the standard deviation manually. The fill between upper and lower bands gives you the visible envelope; many traders also like to display band-width separately as its own oscillator. Using overlay=true plots the bands directly on price.

How is BB calculated?

Bollinger Bands wrap a moving average with statistical envelopes that scale to the asset's recent volatility.

  1. 1.Compute a 20-bar simple moving average (SMA) of close — the middle band.
  2. 2.Compute the 20-bar standard deviation of close.
  3. 3.Upper band = middle band + (2 × standard deviation).
  4. 4.Lower band = middle band − (2 × standard deviation).
  5. 5.Band width (upper − lower) reflects current volatility; widening = expansion, contracting = squeeze.

When does BB fail?

Bollinger Bands give context (volatility, statistical extremes) rather than directional signals. They fail when traders treat them as standalone triggers.

Strong directional trends produce extended "band walking" where price rides the upper or lower band for dozens of bars. Selling at the upper band in a runaway uptrend is the most common BB failure mode.

Low-liquidity instruments produce erratic standard-deviation calculations that warp the bands. The 95% statistical assumption only holds when price returns are roughly normally distributed — thin volume breaks that assumption.

Sudden volatility expansions (news events, gaps) widen the bands instantly, but the next bars often print extreme distances even with the wider bands.

Pair BB touches with confirmation (reversal candle, RSI divergence, volume spike) so you trade context plus trigger, not the band touch in isolation.

What mistakes do traders make with BB?

  • Selling every upper-band touch. In strong uptrends, price walks the upper band for many bars. Touching alone is not a sell signal — wait for a reversal candle plus RSI divergence or rejection.
  • Ignoring the squeeze. The most reliable BB setup is band-width contraction (squeeze) followed by an expansion breakout. Trading bands without checking width misses the highest-EV setups.
  • Treating bands as predictive of direction. Bands give context (stretched, calm, expanding) but say nothing about which way price will move. Always pair with a directional trigger.
  • Using default 20/2 settings on every timeframe. The 20-period SMA is calibrated for daily data. On 1-minute charts, 20-period bands are extremely sensitive; consider longer lengths for noise reduction.
  • Ignoring the middle band. The 20 SMA itself is an underused trend gauge — price holding above signals a healthy regime, while frequent crosses below mark trouble. Many setups can be filtered just by middle-band direction.

How does BB compare to similar tools?

IndicatorWhen to prefer
ATRATR gives volatility magnitude in price units (great for stops, sizing); BB gives volatility-adjusted price levels (great for context). Use ATR for risk management, BB for entry context.
Keltner ChannelsKeltner uses ATR-based bands (not standard deviation), making them less reactive to single outlier bars. Often paired with BB for squeeze detection (BB inside Keltner).
RSIRSI is bounded 0–100 and easier to read at a glance; BB requires reading width and position together. Use RSI for clean overbought/oversold; BB for full volatility context.

BB FAQ

Why do prices spend roughly 95% of the time inside Bollinger Bands?

Under a normal distribution, ±2 standard deviations from the mean captures about 95.4% of observations. Price returns are not perfectly normal (fat tails, skew), but the approximation is close enough that the 95% framing is a useful baseline. The ~5% of bars outside the bands cluster around volatility expansions and news-driven gaps.

How is a Bollinger Band squeeze different from low volatility?

Low volatility means narrow bands. A squeeze is specifically when band-width contracts to a multi-bar minimum (e.g., 20-bar low). The squeeze setup is interesting because it tends to precede a volatility expansion — the market is coiled. Just narrow bands tells you the current state; a squeeze tells you a state shift is likely.

Should I use 20/2 or 20/2.5 settings?

20/2 is the original and captures ~95% of price action. 20/2.5 captures ~99% — fewer touches, but each one is more meaningful. Choose based on signal frequency vs noise: 2.0 for active mean-reversion strategies that need many setups, 2.5 for selective traders willing to wait for extreme stretches.

Can I use Bollinger Bands as a standalone strategy?

BB-only systems work in mean-reverting markets but fail badly in trends. Most successful BB strategies combine: (1) BB for volatility context, (2) a directional trigger (RSI divergence, reversal candle, MACD shift), and (3) a regime filter (trend direction, squeeze detection). Standalone BB touches are too prone to band-walking failures.

Continue exploring

Related indicators in the Playbook

Browse all 8 indicators

About these ideas

Each entry, exit, and utility rule in the Playbook is hand-picked from established trading literature, validated against historical backtests, and reviewed by the PineWiz team. We add new ideas as we encounter them and refresh existing ones when market behavior or default settings shift. Last review: .

Educational content. Not financial advice.