TREND, MOVING AVERAGES & STRUCTURE
Donchian channel
A channel drawn straight through the recent highs and lows.
spec id: donchianoutputs: upper · mid · lowerlength (default 20)
What does Donchian channel measure?
A channel drawn straight through the recent highs and lows. Price breaking out of it is the oldest trend-following signal there is.
How is Donchian channel calculated?
The upper line is the highest high of the last 20 candles, the lower line the lowest low, and `mid` is the two averaged.
Written by reading the engine’s real computation, not a textbook — where the two differ, the page describes what actually runs.
How do I use Donchian channel in a bot?
In the builder, add an indicator of type donchian (parameters: length, default 20). Its output series — upper, mid, lower — become operands you can compare in any entry or exit rule. The engine grades the whole rule honestly: real fills, no look-ahead, half the history held back.
See it inside a famous strategy
- Buy new highsA leader pushes to a fresh 52-week high. You buy strength, not weakness.
- Bull call spreadThe same breakout, but with a capped, defined-risk options trade.
Related indicators
- Directional indexThe raw, unsmoothed strength reading that ADX is built from.
- Exp Hull MAA Hull-style trend line built from exponential averages: fast to turn, and smooth on the way.
- EMAA smoothed price line that follows the trend.
- Elastic VWMAA trend line whose speed is set by volume: a heavy-volume candle drags it a long way, a quiet one barely moves it.
Or browse all 158 indicators in the full library.