Skip to content
All library documents

Bollinger Band Breakouts with Midline Exits and Fixed Stops

Code Quant course library

Summary

This strategy builds 15-minute bars from incoming ticks and updates a rolling indicator manager. After the indicator window is initialized, it calculates Bollinger Bands and a simple moving average midline. When flat, it places stop entries above the upper band and below the lower band, recording those levels as entry references. The approach is a breakout system that can enter long or short.

For an open position, it submits an exit near the midline when the bar closes across it, and also maintains a fixed-distance stop based on the recorded entry level. It cancels existing orders at each new bar before applying its logic. The document supplies implementation details and parameters but no backtest, rationale for the chosen settings, or outcome data. It also leaves fill behavior and the effects of costs or changing volatility unexamined.

Key ideas

  • The strategy aggregates ticks into 15-minute bars and waits for the indicator window to fill.
  • It enters long above the upper Bollinger Band or short below the lower band using stop orders.
  • Positions have a midline-based exit condition and a fixed-distance protective stop.
  • Existing orders are canceled at the start of each new bar.
  • No performance test or rationale for the parameter choices is given.

Tags

From a private course collection; the original is not published.