Lower band bounce with confirmation
A mean-reversion long that uses the bands for context and a candle for the trigger.
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
A mean-reversion long that uses the bands for context and a candle for the trigger.
A volatility-ignition entry that rides expansion out of a tight-band coil.
A trend-continuation long that buys when the short-term pullback exhausts.
Exit ideas
A statistical-stretch exit that locks gains when the move is 2 std dev extended.
A patient mean-reversion exit that takes profit at the statistical expected value.
A volatility-fade exit that closes when the expansion fuelling the trade dies out.
Utilities
A regime filter that only fires when bands are compressed — squeeze conditions ripe for breakouts.
A timing filter that fires only when current volatility has compressed to a multi-bar low.
| Parameter | Default | When to adjust |
|---|---|---|
| Length | 20 | John Bollinger's original setting. Reduce to 10 for very short-term sensitivity; raise to 50 for weekly/macro context. |
| Multiplier (std dev) | 2 | Captures 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. |
| Source | Close | Most common. Some traders use HLC3 to smooth wick noise on volatile instruments. |
| MA type | SMA | Bollinger's original used a simple moving average. Some modern variants use EMA for responsiveness — produces different bands. |
//@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.
Bollinger Bands wrap a moving average with statistical envelopes that scale to the asset's recent volatility.
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.
| Indicator | When to prefer |
|---|---|
| ATR | ATR 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 Channels | Keltner 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). |
| RSI | RSI 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. |
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.
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.
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.
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
Average True Range
A non-directional measure of volatility: the average size of the bar-to-bar true range over a chosen lookback.
View ATRMomentumRelative Strength Index
A momentum oscillator that measures the speed and magnitude of recent price changes on a bounded 0–100 scale.
View RSITrendMoving Average Convergence Divergence
A trend-momentum indicator built from the difference between two EMAs, plus a signal line and histogram that visualise momentum shifts.
View MACDAbout 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.