Bollinger Band Breakouts Filtered by Bandwidth and Candle Range
Summary
This BTC/USDT futures strategy uses Bollinger Bands built from a 20-period simple moving average and two standard deviations. It tracks band width across three consecutive observations, marking it as expanding, contracting, or unchanged. A candle is highlighted as a breakout when its full high-low range exceeds half the band width and its close is outside the upper or lower band. The source enters long on an upper-band breakout and closes that position on a lower-band breakout.
The overview also describes EMA200 as a medium- to long-term trend filter and refers to bandwidth conditions in its entry and exit rules. However, the supplied code plots EMA200 without applying it to those rules, and the width state is used for band coloring rather than as an entry filter. The document gives daily BTC/USDT backtest dates but no performance statistics. It warns that ranging markets can generate repeated trades and that parameter fitting, abrupt trend changes, and slippage can undermine results.
Key ideas
- Band width is classified by comparing its current value with the prior two observations.
- The coded breakout condition requires a candle range above half the band width and a close outside a band.
- The source opens long above the upper band and closes the long below the lower band.
- EMA200 is plotted but does not filter trades in the provided entry and exit code.
- No backtest performance statistics are reported, and the document identifies ranging-market and slippage risks.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.