Donchian Channel Breakout Entries with Two Exit Rules
Summary
The document describes a long-only breakout system that enters when the closing price crosses above the prior upper boundary of a channel. Although the prose calls the indicator Bollinger Bands, the supplied code calculates the channel from the highest and lowest prices over a lookback period and defines its midpoint from those extremes. It is therefore a Donchian-style channel, not a standard-deviation Bollinger Band. The user can choose to close a position after price crosses below the prior lower boundary or below the prior midpoint.
Example settings use a 20-period lookback and show a BTC/USDT futures backtest on five-minute bars with a one-minute base period over a stated one-week date range. No performance results are reported, and the strategy's profit calculation ignores fees and slippage, which can overstate returns. The text also notes false breakouts, long-only exposure, and parameter dependence. It presents this as a trend-following approach but does not provide evidence that it performs reliably across instruments or time frames.
Key ideas
- The supplied code enters long when the close crosses above the prior highest price over the selected lookback.
- Despite the prose's Bollinger Band references, the code uses highest and lowest prices to form a Donchian-style channel.
- A position can be closed after price crosses below either the channel low or its midpoint.
- The example backtest uses BTC/USDT futures on five-minute bars, but reports no performance results.
- Ignoring fees and slippage can make simulated returns look better than live trading outcomes.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.