You open a chart, drop the Bollinger Bands indicator onto it, and see three curvy lines wrapping around the price. The obvious question: is this thing telling me to buy or sell?
Two ways beginners answer that. The first: price touches the upper band, sell. Price touches the lower band, buy. The second: the bands describe volatility – the touch itself means nothing without context. The first approach is what most tutorials teach. The second is what actually works. This article is about the second one.
The scenario: you’re staring at a chart and the bands just widened
Say you’re watching a stock. It’s been flat for two weeks. The bands have squeezed tight against the moving average, forming a narrow ribbon. Then, in one session, price rips through the upper band and the bands blow open like an umbrella.
Beginner instinct says “overbought, short it.” That instinct will lose you money in a trending market. Understanding why is basically the entire point of learning this indicator.
What the Bollinger Bands indicator actually is
Bollinger Bands were created by John Bollinger in the early 1980s. One question, per his official site: are prices high or low on a relative basis? Not absolutely high or low – high or low relative to recent volatility. That distinction is the whole game.
Three lines, all from closing price. The middle band is a simple moving average (usually 20 periods). Add 2 standard deviations above it – upper band. Subtract 2 below – lower band. Standard deviation is a volatility measure, so the bands automatically stretch when the market gets choppy and contract when it goes quiet. Fidelity’s indicator guide confirms 20 and 2 as the platform default (as of 2025), though both are adjustable.
That’s it. Everything else – squeezes, walks, bounces – is just a pattern people noticed in how those three lines behave over time.
Here’s something worth sitting with for a moment: “relative” sounds simple, but in real time it’s slippery. Relative to which 20 periods? The last 20 calm sessions, or 20 sessions that included an earnings spike? The bands can’t tell you. They reflect whatever history you feed them – which is why the same asset can look “cheap” or “expensive” on Bollinger Bands depending purely on when you started the window.
Setting it up in Python (and the one gotcha)
On any modern platform – TradingView, ThinkorSwim, MT5 – Bollinger Bands are built in. Search, add, done. Leave the defaults unless you have a reason.
Computing them yourself in pandas takes 6 lines:
import pandas as pd
# df has a 'close' column
df['MA20'] = df['close'].rolling(20).mean()
df['STD20'] = df['close'].rolling(20).std()
df['Upper'] = df['MA20'] + 2 * df['STD20']
df['Lower'] = df['MA20'] - 2 * df['STD20']
Turns out pandas_ta disagrees with every chart platform on the default. Per its official API reference, bbands() defaults to length=5, not 20. Copy-paste example code without checking – your bands will look nothing like the ones on your broker’s chart. Pass length=20 explicitly every time.
The one pattern beginners get wrong: walking the band
Price closes at the upper band. Sell? That’s what the tutorials say. Here’s what actually happens in a strong uptrend: price closes at or near the upper band again the next day. And the day after. Sometimes for weeks. Community analysis from Tradealgo and others calls this “walking the band” – and it’s documented as the single most common misuse of the indicator (as of early 2025). Selling every touch means fighting the strongest trend signal there is.
Before applying any mean-reversion logic, check the middle band’s slope. Flat? The reversal interpretation holds. Sloping steeply? Price will likely keep hugging one band – wait for a close back inside before betting against the trend.
Community backtests on naive “sell the upper band” strategies have shown this approach generating losing signals throughout sustained bull markets. The indicator wasn’t broken. It was being asked a question it doesn’t answer.
The squeeze – and why timeframe matters
The one pattern with an actual signal worth watching: the squeeze. Bands contract to an unusually narrow width – volatility is compressed. Compressed volatility releases.
The catch: direction has to come from somewhere else. The squeeze tells you a move is coming, not which way. Practitioners note the squeeze is far more reliable on 4-hour and daily charts – on 5-minute charts, squeezes appear often and most fizzle. A filter that appears often in community strategies: confirm breakouts with volume at least 50% above the 20-day average. Without that confirmation, you’re guessing on direction.
Honest limitations
Bollinger Bands are a lagging indicator – built from a moving average, which looks backward by definition. Signals arrive after the move is already underway (per the IG glossary, as of early 2025; verify against your platform’s current documentation).
Where they break down specifically:
| Situation | What breaks | Adjustment |
|---|---|---|
| Strong trend | Reversal signals produce consistent losses | Use bands for pullback entries to the middle band, not reversals |
| Crypto / very volatile assets | 20, 2 defaults whipsaw badly | Try 20, 2.5 or 20, 3.0 to widen the bands |
| Sub-hourly timeframes | Squeezes fire too often | Confirm on H4 or daily first |
| Any timeframe, used alone | False signals | Pair with volume or RSI |
John Bollinger himself has said the bands should never be used in isolation – that’s not a hedge, it’s the actual design intent. The false-signal rate drops noticeably when you add a momentum oscillator or volume confirmation.
FAQ
Are Bollinger Bands better than moving averages alone?
They contain one – the middle band is a 20-SMA. The upper and lower bands add volatility context on top. Strictly more information, not a replacement.
What settings should I use on a 15-minute crypto chart?
Standard 20, 2 tends to whipsaw on crypto. A common adjustment is 20, 2.5 or 20, 3.0 to widen the envelope and filter out normal volatility noise. But here’s the part most guides skip: BTC behaves differently from a low-cap altcoin – the “right” multiplier for one won’t match the other. There’s no universal setting. The only honest answer is to test both against your specific pair’s realized volatility and see which produces fewer false exits on historical data.
Can I use Bollinger Bands for long-term investing?
Monthly-timeframe bands can show whether an asset is stretched relative to its own multi-year volatility history. But don’t expect precise entries – that’s not what this indicator does. Use it as context for sizing or patience, not as a timing signal. That distinction matters more on longer timeframes than on shorter ones, where the lagging nature has time to even out.
Next action: pull up a chart you already know well, add Bollinger Bands with the default 20/2, and scroll back through the last two years. Find one squeeze that led to a breakout, and one instance where price walked the band. Once you can spot both by eye, you’re ready to use the indicator for real.