Donchian Channels — what it is and how to use it in trading
Definition
Donchian Channels are the simplest of the channels: the upper boundary is the highest high, the lower is the lowest low over the last period candles, and the midline is their arithmetic average. Essentially recent_high and recent_low combined into one paired indicator with a shared midline.
How it works in the builder
The donchian_upper, donchian_lower, and donchian_mid operands take a period parameter (default 20). The upper and lower boundaries only move when a genuinely new extreme enters the window, and the midline is their arithmetic average.
What it looks like on the chart
Drawn as candles inside a literally stepped channel — both boundaries stay flat and jump only when a new extreme appears, hence right angles rather than a smooth curve like Keltner's. The midline is dashed, the chosen boundary is highlighted as a bold solid line.
Typical use
The classic breakout system: close crossed_above donchian_upper(20) as a long entry (the core of the historical "turtle trading" breakout system), donchian_lower as the mirrored short entry or a trailing-stop reference.
Common pitfalls
Because the boundaries only move on a genuine new extreme, the channel can stay perfectly flat for long stretches in a range, visible as a stepped rather than smooth line. The same "window expiry" effect as recent_high/recent_low applies: a wide channel from an old volatility spike can persist long after it has died down, until the relevant bars roll out of the window.
This block is available in the strategy builder
137 no-code blocks — build an entry condition with this term and test it on history
Historical results do not guarantee future ones. The service is an informational and analytical tool, not an individual investment recommendation; trades are not executed.
Donchian Upper
Block variants
Donchian Lower
Donchian Mid