Bollinger Band Breakouts with ATR Stops and Midline Exits
Summary
This strategy uses Bollinger Bands on 15-minute bars to place stop entries above the upper band and below the lower band while flat. It calculates a simple moving average as the middle band and uses that level as an exit trigger: long positions are sold when a bar closes at or below it, while short positions are covered when a bar closes at or above it. Position size is fixed, and the strategy cancels outstanding orders at each new bar before updating its indicators.
Protective stops are set using the entry band and the current ATR: the long stop is below the recorded long entry by an ATR-based distance, and the short stop is above the recorded short entry. The document provides implementation details but no backtest, trading results, or market assumptions. It does not discuss costs, slippage, position sizing by risk, or how stop execution behaves in gaps, so the code alone does not establish profitability or robustness.
Key ideas
- The strategy submits stop entries at the upper and lower Bollinger Bands when flat.
- Long and short positions exit when the bar close crosses the moving average in the adverse direction.
- Protective stops use an ATR multiple measured from the stored entry band.
- The strategy operates on 15-minute bars and uses a fixed order size.
- The code gives no performance evidence or treatment of transaction costs.
Tags
From a private course collection; the original is not published.