Skip to content
All library documents

Donchian Channel Breakouts with Adaptive Filters and Trailing Stops

Article Strategy library · Author: millerrh

Summary

This Pine strategy buys when price breaks above the upper Donchian Channel and exits by trailing a stop along the lower channel. The upper and lower lookback periods can be set independently, allowing breakout and exit sensitivity to differ. Traders can choose whether signals trigger on intrabar wicks or candle closes, and optionally use a tighter channel for the initial stop before switching to a wider trailing channel.

Additional controls include date-limited backtesting, moving-average filters on the current or a higher timeframe, and a filter that rejects setups when the distance between channel bands is too large relative to average daily range. The document describes configurable design features rather than presenting performance results, so it does not establish profitability. The filters and stop behavior would need evaluation across instruments and market conditions, with realistic costs and execution assumptions.

Key ideas

  • The strategy enters long when price breaks above the upper Donchian boundary.
  • It can trail exits using the lower channel, with an optional tighter initial stop.
  • Upper and lower channel lookback periods can be configured independently.
  • Moving-average, average-range, date-window, and wick-versus-close settings can shape trade selection.

Tags

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