Bollinger Bands place a dynamic envelope around price — two standard deviation bands above and below a 20-period moving average. The bands expand when markets are volatile and contract when they are quiet. That expansion and contraction is the signal.

Volatility / Support-Resistance
Category
Beginner
Difficulty
Price scale — three lines overlaid on candlesticks
Output Range
20 (SMA) with 2 standard deviations
Default Period
None
Repaint Risk
Simple — close price
Data Need
VOLATILITY · SUPPORT_RESISTANCE · MEANREVERSION · BEGINNER_FRIENDLY · LAGGING · REAL_TIME
Tags

Section 1: Core Mechanics

John Bollinger developed Bollinger Bands in the early 1980s and trademarked the name in 2011. The core insight is that standard deviation adapts to current market volatility — unlike fixed percentage envelopes. At 2 standard deviations, approximately 95% of price action falls inside the bands under normal distribution conditions.

Formula

Where is the standard deviation of closing prices over the last N periods, and is the standard deviation multiplier (default 2).

Band Width (volatility measure):

Percent B (price position within bands):

Inputs

  • Close price: Default. Can apply to HLC/3 or HL/2.
  • Period (N): 20 default. Defines the SMA length and the lookback for standard deviation.
  • Standard deviations (k): 2.0 default. Controls band width.

Parameters

Parameter Default Range Impact
Period (N) 20 10–50 Lower = narrower, more responsive; Higher = wider, smoother
Multiplier (k) 2.0 1.5–2.5 Higher = fewer touches, stronger signal when touched
Price source Close Close / HLC3 Minimal real-world difference

Output

Three lines overlaid on the price chart: Upper Band, Middle Band (SMA), Lower Band. A sub-indicator — Band Width — plots band separation as a percentage on a separate panel.

Visual Behavior

  • Bands narrow → low volatility, squeeze in progress
  • Bands expand → volatility spike, trend or reversal underway
  • Price hugs upper band → strong uptrend (band walk)
  • Price hugs lower band → strong downtrend (band walk)
  • Price oscillates between bands → ranging market, mean reversion setup

Section 2: Interpretation & Signals

Bollinger Bands have three distinct uses. The market regime determines which applies.

The Three Strategies

Strategy Market Condition Signal Action
Squeeze / Breakout Bands narrow to multi-month low BW at 6-month low → wait for direction Enter after breakout candle closes above/below the bands
Mean Reversion Ranging market Price touches upper band Short toward middle band. Price touches lower band: long toward middle
Band Walk (Trend) Strong trending market Price stays outside band for 2+ bars Hold trend; look for continuation, not reversal

Squeeze Setup

The Bollinger Squeeze is the most powerful setup: when Band Width reaches a 6-month low, a major directional move is imminent. The bands do not tell you which direction — you need a confirming breakout.

Bollinger Squeeze — Band Compression Preceding Breakout

Mean Reversion Rules

In a ranging market (ADX < 20):

  • Price closes outside the upper band → look for short entry on the next bar that closes back inside the bands
  • Target: middle band (SMA 20)
  • Stop: candle close outside the band by more than 0.5× ATR
💡 TIP
Mean reversion at the bands works best when %B reaches above 1.0 (above upper band) or below 0.0 (below lower band) and RSI simultaneously shows overbought or oversold. The confluence of both conditions cuts false reversals by roughly 40%.
⚠️ WARNING
Never use mean reversion signals in a strongly trending market. In an uptrend, price can "walk the upper band" — closing outside the upper band for 10–15 consecutive bars without ever reverting. Check ADX first: if ADX > 25, skip band-touch mean reversion signals entirely.

Section 3: Pass vs. Live — Real-Time Reliability

None — standard deviation recalculates on closed bars only
Repaint Risk
~10 bars for the SMA center line; band width reacts faster than price direction
Lag
Wait for candle close — band positions shift as price moves intrabar
Confirmation Timing
Squeeze identification + mean reversion in ranging markets + trend walk confirmation
Best Use
Using upper/lower band touches as mechanical signals without ADX regime filter
Avoid

The bands recalculate their width every bar as new closes replace old ones. On a live (unclosed) candle, the bands are preliminary. A candle that appears to close outside the band during the session may pull back inside before close — wait for the bar to close before acting.


Section 4: Practical Use Cases

Setup: Bollinger Bands (20, 2) on 15m chart + RSI(14) Signal: Price closes outside lower band while RSI < 30 → mean reversion long Entry: First candle that closes back inside the lower band Exit: Price reaches middle band (SMA 20) or upper band in strong move Key rule: Only use in identified ranging conditions — skip if ADX > 25 on 1H chart

Real example: NVIDIA (NVDA) on the daily chart, January–February 2023: Band Width compressed to a multi-month low during the first two weeks of January while price traded in a $15 range. On January 25, 2023, NVDA closed above the upper band at $195. The subsequent band walk carried price to $280 by May — a 44% move. Mean reversion traders were stopped out repeatedly; the band-walk signal was the correct read for that regime.


Section 5: Pseudo Code

INPUT: close[], period=20, multiplier=2.0

PROCESS:
  Step 1: Calculate SMA for each bar i starting from index (period - 1)
            middle[i] = sum(close[i-period+1 : i+1]) / period
  Step 2: Calculate standard deviation over the same window
            variance = sum((close[j] - middle[i])^2 for j in window) / period
            stddev[i] = sqrt(variance)
  Step 3: Calculate upper and lower bands
            upper[i] = middle[i] + multiplier * stddev[i]
            lower[i] = middle[i] - multiplier * stddev[i]
  Step 4: Calculate Band Width and %B
            bw[i] = (upper[i] - lower[i]) / middle[i] * 100
            pctb[i] = (close[i] - lower[i]) / (upper[i] - lower[i])

OUTPUT: upper[], middle[], lower[], bw[], pctb[]
EDGE CASES:
  - Fewer than period bars: return all NaN
  - Flat price (all closes identical): stddev = 0, bands collapse to center line
  - Multiplier = 0: upper = lower = middle (degenerate case)
  - Negative close prices: formula still valid mathematically

Section 6: Parameters & Optimization

Standard Period Conventions

Period Common Use Notes
10 Short-term (intraday) Very reactive; frequent touches; more noise
20 Default (Bollinger's own) Best balance; matches one trading month
50 Long-term trend Wider bands; fewer touches; only major extremes

Multiplier Impact

Multiplier Band Touches Signal Frequency Use Case
1.5 Frequent High (too many) Not recommended — too much noise
2.0 ~5% of bars Standard Default for most strategies
2.5 Very rare Low Only extreme moves trigger — crisis detection
When should I change from 2.0 to 2.5 standard deviations?

Use 2.5 SD multiplier when trading high-volatility assets (crypto, leveraged ETFs) or around earnings season. The wider bands prevent false reversal signals during legitimate volatility spikes. At 2.5 SD, a band touch signals a statistically rarer event — one that is less likely to be noise and more likely to be a genuine extreme.

What is the Bollinger Band %B and how do I use it?

Percent B places the current close within the band range: %B above 1.0 means price is above the upper band; %B below 0.0 means price is below the lower band; %B = 0.5 means price is at the middle band. Use %B as a momentum proxy — a %B that makes a new high (above 1.0) while the prior swing did not suggests accumulation. RSI + %B combination is more reliable than either alone for overbought/oversold signals.


Section 7: Synergies & Conflicts

Works Well WithAvoid Combining With
RSI%B above 1.0 + RSI > 70 = overbought confirmation; %B below 0.0 + RSI < 30 = oversold. Reduces false reversals
ADXADX > 25 → switch to band-walk mode (hold with trend); ADX < 20 → switch to mean reversion mode. ADX defines which BB strategy applies
VolumeSqueeze breakout + volume expansion = high-conviction entry. Low volume breakout from squeeze = suspect — wait for volume to confirm
MACDMACD histogram turning positive at lower band = double confirmation for long mean reversion entry
Keltner ChannelsBoth measure volatility envelopes. The Squeeze indicator (KC inside BB) is useful but adds complexity — use one primary volatility envelope at a time
SMA of same periodThe Bollinger middle band IS the SMA(20). Adding a separate SMA(20) to the chart creates a duplicate with no additional information

Section 8: Common Mistakes

Mistake Root Cause Solution
Buying lower band / shorting upper band mechanically Treating every touch as a mean reversion signal Check ADX first — if ADX > 25, price may walk the band instead of reverting
Trading the squeeze without a direction filter Squeeze only signals that a move is coming, not which way Wait for a close above/below the bands post-squeeze before entering
Using period 10 for all timeframes Impatience — shorter periods feel more responsive Period 10 bands are too narrow and generate excessive noise. Default 20 is Bollinger's own recommendation
Ignoring Band Width as a metric Watching only band touches, not band compression Add Band Width as a sub-indicator. The lowest BW reading in 6 months is a high-probability squeeze setup
Applying mean reversion to trending assets Assuming every extreme reverts to the mean Strong trends can produce 10–20 consecutive bars outside the bands. Mean reversion in trend = fighting the tape

Section 9: Cheat Sheet

ℹ️ INFO
**Bollinger Bands**

USE WHEN: Band Width at multi-month low (squeeze); ranging market with clear upper/lower boundaries; strong trend for band-walk confirmation
AVOID WHEN: ADX < 15 (too choppy even for ranging); news/earnings imminent; extremely thin markets

ENTRY SIGNAL (Mean Reversion): Close outside band + RSI confirms → enter on next close back inside band
ENTRY SIGNAL (Squeeze Breakout): Band Width 6-month low → wait for close above upper OR below lower band → enter next bar
EXIT SIGNAL: Opposite band (for mean reversion); Band Width expanding sharply then reversing (for trend/squeeze)

PARAMETERS: (20, 2.0) default for equities; (20, 2.5) for crypto and high-vol assets
CONFLUENCE: ADX (regime filter) + Volume (breakout confirm) + RSI (overbought/oversold timing)

RISK: Band walk in trending markets makes mean reversion signals very costly — always check trend regime first
BEST TIMEFRAME: Daily chart for squeeze setups; 15m–1H for intraday mean reversion; weekly for major regime shifts