Skip to content
All library documents

Donchian Midline Breaks for Trend Following

Article Strategy library · Author: ChaoZhang

Summary

This trend-following approach builds a channel from the prior 20 periods’ highest and lowest closing prices, then takes their midpoint as a reference line. A close above the midpoint prompts a long position, while a close below it prompts a short position. The prose describes exiting when price returns across the channel in the opposite direction; the supplied implementation uses different close rules, closing the long below the lower boundary and the short above the midpoint.

The document presents the channel as a way to follow price direction and filter some noise, while noting that pullbacks, ranging conditions, and parameter choices can produce poor outcomes. It suggests tuning the lookback, adding stops or other indicators, and entering in stages. No strategy performance results are reported. The published test settings use BTC-USDT futures on four-hour bars, despite the discussion describing stock trading, so the intended market and the exact exit logic remain unclear.

Key ideas

  • The channel uses 20 period highs and lows to calculate upper and lower boundaries and a midpoint.
  • A close above or below the midpoint is presented as a long or short entry signal.
  • The prose and code specify different position exit conditions.
  • The approach may struggle in ranging markets and during pullbacks.
  • The stated backtest configuration concerns BTC-USDT futures, while the explanation refers to stocks.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.