BullsEdges algo trading guide: Bollinger Bands adapt to volatility around a moving average. Learn how to read them, the squeeze setup, and the difference between band walks and reversals.
Bollinger Bands, developed by John Bollinger, place a band above and below a moving average at a distance based on standard deviation. Because the distance changes with volatility, the bands widen in active markets and narrow in quiet ones.
BullsEdges algo trading application: Distinguish a squeeze breakout setup from a reversal setup; the same band touch can mean different things in different regimes.
The construction
- Middle band: usually a 20-period simple moving average.
- Upper band: middle + 2 standard deviations.
- Lower band: middle - 2 standard deviations.
Statistically, with normal-looking data most closes fall inside the bands, but markets are not perfectly normal, and touches of the bands are common in trends.
Reading the bands
Volatility
Wide bands mean high recent volatility; narrow bands mean low volatility. The bandwidth (upper minus lower, divided by middle) puts a number on it.
The squeeze
When bandwidth falls to a multi-week low, volatility is compressed. Compression tends to be followed by expansion. The squeeze does not tell you the direction - only that a bigger move is more likely. Traders combine it with a breakout trigger or a trend filter for direction.
Band walks
In a strong trend, price can "walk" along the upper or lower band for many bars. Touching the upper band in an uptrend is a sign of strength, not an automatic sell signal.
Mean reversion in ranges
In a sideways market, moves to the outer bands often snap back toward the middle. This is the classic Bollinger reversal trade - and it fails exactly when a range turns into a trend.
Strategy ideas to test
- Squeeze breakout: wait for bandwidth to reach a low, then trade the first close outside the bands in the direction of the higher-timeframe trend. Stop at the middle band or opposite band.
- Trend pullback: in an uptrend, buy when price pulls back to the middle band and turns up.
- Range fade: only when a trend filter (such as ADX below 20) confirms a range, fade touches of the outer bands with a target at the middle band.
Combining with other tools
The Keltner Channel (based on ATR) is often used with Bollinger Bands: when the Bollinger Bands move inside the Keltner Channel, the squeeze is especially tight. Many "squeeze" indicators use exactly this comparison.
Testing notes
- The 20 and 2 settings are conventional. Check that nearby values give similar results.
- Squeeze strategies trade rarely; make sure the backtest has enough trades.
- Breakouts after a squeeze can be fast; use realistic spread and slippage.
BullsEdges takeaway for algo trading
Bollinger Bands describe volatility. Use them to spot compression before expansion and to frame pullbacks. Treat band touches as information about strength, not as automatic reversal signals.
Trading forex and gold carries a high level of risk and may not be suitable for every investor. Past performance and backtests do not guarantee future results. This article is education, not financial advice.
