Indicators
Donchian Channels Explained: Breakout Trading for Bots
How Donchian Channels track the highest high and lowest low, the classic Turtle breakout strategy, and how to automate it in Setup.Cash.
Featured image placeholder
/og/setup-cash-og.svg
Donchian Channels are the simplest channel in trading: the upper line is the highest high of the last N bars, the lower line is the lowest low, and the middle is their average. They powered the legendary Turtle Traders breakout system, and they still work as a clean, rule-based framework for bots.
How Donchian Channels Work
With the default length of 20:
- Upper band: highest high of the last 20 bars.
- Lower band: lowest low of the last 20 bars.
- Middle: the midpoint of the two.
A new 20-bar high means price is doing something it hasn't done in 20 bars, that's the entire signal. No smoothing, no formulas to argue about.
The Classic Breakout Strategy
The Turtle-style rules are beautifully mechanical, which makes them perfect for automation:
- Enter long when price breaks the upper band (new N-bar high).
- Enter short when price breaks the lower band.
- Exit on a break of the opposite band with a shorter length (e.g. enter on 20, exit on 10).
- Size positions with ATR so every trade risks the same.
Breakout systems lose small amounts often and win big occasionally, the backtest metrics that matter are profit factor and max drawdown, not win rate.
Building It in Setup.Cash
Add Donchian Channels in the strategy builder, it ships with ready-made Breakout and Breakdown events, so the Turtle entry is one condition. Add a trend filter like ADX to skip breakouts in dead markets, and manage exits with a trailing ATR stop.
Tuning
- Length 20: the classic daily-chart setting.
- Longer (55): the Turtles' second system, bigger, rarer breakouts.
- Shorter (10): exit channel, or fast entries on intraday timeframes.
Related Reading
Donchian Channels pair naturally with Keltner Channels (volatility context) and the Supertrend (trailing exit). Backtest across several markets, breakout systems live or die by diversification.
Related Posts
View allIndicators
Aberration Bands Indicator Explained
How the Aberration system wraps an ATR channel around a typical-price average for classic breakout trading, in Setup.Cash.
1 min read · 200 words
Indicators
Acceleration Bands Indicator Explained
How Price Headley's Acceleration Bands widen proportionally to range for momentum breakout entries, in Setup.Cash.
1 min read · 191 words
Indicators
Accumulation / Distribution (A/D) Indicator Explained
How the A/D line weights volume by close location within the range to track accumulation, in Setup.Cash.
2 min read · 208 words
Indicators
ADX and DI Explained: Measuring Trend Strength
How the Average Directional Index measures trend strength, how +DI and −DI show direction, and how to use ADX as a regime filter in Setup.Cash.
2 min read · 286 words
Start here
Build your trading bot workflow with structure
Use Setup.Cash to create, backtest, and paper trade rule-based strategies without relying on guesswork. Not financial advice. Trading involves risk.