Bollinger Band Breakout Reentries with Middle-Band Exits
Summary
This strategy builds Bollinger Bands from a moving average and a standard-deviation range. It detects a close outside either band, then looks for a close back inside and enters after that reentry. The article's prose says to trade in the breakout direction, but the supplied code does the reverse: an upper-band breakout followed by reentry triggers a short, while a lower-band breakout followed by reentry triggers a long. The code closes a long when price falls below the middle band and a short when price rises above it.
The document lists adjustable band length, moving-average type, price source, and deviation multiplier, and supplies a BTC/USDT futures backtest configuration for February 2024. It reports no performance results. It warns that band parameters can shift entries, oscillation near the bands can increase trading costs, and a persistent trend may not reenter soon enough to trigger a position. The source also tracks a breakout peak, but that value does not appear in its entry or exit conditions. Volume, trend filters, alternative exits, and volatility-aware sizing are suggested as possible extensions.
Key ideas
- The strategy waits for a close outside a Bollinger Band and then enters after price closes back inside.
- The code enters against the breakout direction, despite the prose describing entries in the breakout direction.
- The code uses the middle band for exits and tracks a breakout peak that does not affect the trade rules.
- The supplied BTC/USDT futures backtest configuration includes no performance results.
- Band reentries may produce frequent trades in choppy markets and may miss persistent trends.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.