Donchian Channel (N-Bar Hoch/Tief)
The highest high and lowest low of the last N bars. A close above the upper channel = breakout (long), below the lower = breakout (short). Core of the Turtle trading system.
What is the Donchian Channel?
After Richard Donchian, a pioneer of rule-based trend following. The channel is about as simple as it gets:
Upper = max(high, N) # highest high of the last N bars
Lower = min(low, N) # lowest low of the last N bars
Mid = (Upper + Lower) / 2
It became famous through the Turtle Trading experiment (Richard Dennis & William Eckhardt, 1983): a 20-bar breakout as entry, a 10-bar counter-breakout as exit.
Signal logic (breakout)
Close > Upper(N-before-current) → LONG (new N-bar high = trend continuation)
Close < Lower(N-before-current) → SHORT
Important: the channel is built from the bars before the current one, otherwise the breakout would trivially always be "at the edge".
How Botty uses the Donchian
- Channel as cache series:
data/indicator_cache.py(dc_high,dc_low). - Entry
donchian_breakout(strategies/conditions/entries.py): a trend-continuation entry that fills the gap left by reversal-heavy entries. - Full strategy docs: Donchian Channel Breakout (Turtle Trading).
Strengths & limits
✅ Robust, low on parameters, captures every big trend. ✅ A clearly defined, mechanical exit is possible (counter-breakout).
❌ Many false breakouts (whipsaws) in sideways markets — needs a trend/vol filter alongside it. ❌ Late entries: by definition only after the breakout.