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.

By Setup.Cash TeamLast updated 2026-07-032 min read303 words

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:

  1. Enter long when price breaks the upper band (new N-bar high).
  2. Enter short when price breaks the lower band.
  3. Exit on a break of the opposite band with a shorter length (e.g. enter on 20, exit on 10).
  4. 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.

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.

Not financial advice. Trading involves risk. Use backtesting and paper trading before risking real capital.

Related Posts

View all

Indicators

Aberration Bands Indicator Explained

How the Aberration system wraps an ATR channel around a typical-price average for classic breakout trading, in Setup.Cash.

2 min read · 204 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.