Donchian Channels: Build a Breakout System Without Look-Ahead Bias
Last saved:

Executive Summary
- ✦Calculate the breakout boundary from previous completed candles so the current signal cannot move its own threshold.
- ✦Define whether a breakout requires a touch, a trade or a close, then apply that rule consistently.
- ✦Recalculate position size from the actual entry-to-stop distance when price gaps beyond the signal level.
- ✦A valid Donchian breakout can still lose; judge the method over a realistic sample including costs and slippage.
Donchian Channels: Build a Breakout System Without Look-Ahead Bias
Evergreen trading tutorial: This lesson uses a hypothetical example. It is educational information, not personalised financial advice or a promise of returns.
A Donchian Channel turns a simple question into a visible trading rule: what are the highest high and lowest low over a chosen lookback period? Traders often use the answer to identify breakouts, trail exits or define a range. The calculation is simple; the difficult part is avoiding look-ahead bias, controlling risk and deciding what counts as confirmation.
Learning objective
By the end of this guide, you should be able to:
- calculate a Donchian Channel from completed candles;
- define a breakout without using information that was unavailable at the decision time;
- convert the entry and stop distance into a position size;
- separate a valid signal from a profitable outcome; and
- write an exit rule before entering the trade.
What is a Donchian Channel?
For a lookback of N completed candles, the channel has three parts:
- Upper band: the highest high during the previous N completed candles;
- Lower band: the lowest low during the previous N completed candles;
- Middle band: usually the average of the upper and lower bands.
A 20-day channel therefore describes the high-low envelope of the previous 20 completed daily candles. A close above the previous upper band can be treated as an upside breakout; a close below the previous lower band can be treated as a downside breakout.
The word previous matters. If the current candle is included when deciding whether that same candle has broken the band, the band can move with price. A backtest may then use a boundary that was not fixed when the signal occurred. Compare the current close with a channel calculated through the preceding candle.
A step-by-step daily breakout framework
1. Choose the market and timeframe
Use an instrument with sufficient liquidity for the intended position size. Decide in advance whether the rule uses daily, four-hour or another candle interval. Do not switch timeframes after seeing an inconvenient signal.
2. Fix the lookback
Twenty completed candles are common in examples, but 20 is not a universal best setting. A shorter channel reacts faster and normally creates more signals; a longer channel reacts more slowly and may miss part of an early move. Test the setting on data that includes trends, ranges and market stress.
3. Define the trigger precisely
Possible rules include:
- a close above the previous 20-day high;
- a trade above that level during the next session; or
- a close above the band plus a volume or trend filter.
These are different systems. An intraday touch will generate more signals than a closing confirmation. Write one rule and apply it consistently. Our breakout and false-breakout guide explains why a level breach alone does not guarantee continuation.
4. Place the initial invalidation point
The opposite 20-day band may be too far away for some strategies. Alternatives include a recent swing low, a shorter exit channel or a volatility-based distance. The stop should express where the setup is no longer valid, while position size controls how much account risk that distance creates.
5. Calculate position size before entry
One example formula is:
Units = planned cash risk ÷ (entry price − stop price)
This ignores commissions, spread, slippage, currency conversion and gap risk, so a real plan needs an allowance for them. Our position-sizing guide covers the calculation in more detail.
6. Decide the exit rule
A breakout strategy needs a losing exit and a winning exit. A trader might trail the position with a 10-day lower channel, a market-structure stop or a volatility rule. Profit targets are another option. Each choice changes average holding time, win rate and payoff distribution.
Worked hypothetical example
Assume a fictional share has these completed daily values:
- previous 20-day high: £52.00;
- previous 20-day low: £45.50;
- current daily close: £52.40;
- planned entry next session: £52.50;
- initial invalidation level: £50.00.
The close at £52.40 is above the previous 20-day upper band, so it meets this example's signal rule. The planned distance from entry to stop is:
£52.50 − £50.00 = £2.50 per share
Suppose the account is £20,000 and the trader uses a hypothetical risk budget of 0.5% for this setup:
£20,000 × 0.5% = £100 planned cash risk
The theoretical position size is:
£100 ÷ £2.50 = 40 shares
If the next session opens at £53.20, entering there while leaving the stop at £50 increases risk to £3.20 per share. Buying 40 shares would therefore create £128 of price risk before costs. The trader must recalculate, reduce size or reject the trade. A signal does not authorise an entry at any price.
Even with correct sizing, a gap through £50 can produce a worse exit. The £100 figure is a planning estimate, not a guaranteed maximum loss.
How false breakouts appear
A false breakout can close above the channel and then return inside it, or briefly trade beyond the band without closing there. Donchian Channels identify a price event; they do not prove that fresh demand or supply will continue.
Useful questions include:
- Did the breakout close beyond the band or merely wick through it?
- Is the broader daily trend aligned with the signal?
- Is market breadth supporting the move?
- Did the instrument gap so far beyond the band that the stop distance became unattractive?
- Is a scheduled earnings release or macro event likely to dominate the technical setup?
Filters may reduce weak signals, but they can also delay good ones. Judge a filter over a sufficiently large test sample, including realistic costs.
Common mistakes
- Including the signal candle in the decision band. This creates a moving threshold and can introduce look-ahead errors.
- Optimising one perfect lookback. A parameter that fits one period may fail when volatility changes.
- Buying an extended gap without resizing. Entry-to-stop distance, not the original signal level, determines planned risk.
- Treating every breakout as independent. Several correlated positions can behave like one oversized trade.
- Using no exit for winners. An entry rule alone is not a complete system.
- Ignoring costs and liquidity. Frequent breakouts in thin instruments can look attractive before spread and slippage.
- Confusing a valid loss with a bad process. A correctly executed breakout can still fail; evaluate a series of trades.
Practical checklist
- Market, timeframe and session are fixed.
- Channel uses only completed candles available at the decision time.
- Breakout means exactly one defined event: touch, trade or close.
- Entry, invalidation and exit rules are written before the order.
- Size is recalculated from the actual planned entry.
- Spread, slippage, commissions, currency and gap risk are considered.
- Correlated open positions are included in total portfolio risk.
- The rule has been tested across different market conditions.
- Results are reviewed as a sample, not judged from one trade.
The Money Man View
Donchian Channels are most useful as a rule-building tool. They make the breakout boundary observable and testable, but they do not forecast whether a move will persist. The robust workflow is to use prior completed candles, define confirmation and invalidation, size from the real entry-to-stop distance and accept that false breakouts are part of the distribution.
Educational risk disclosure: Trading can lead to losses, including losses larger than planned when markets gap or liquidity disappears. The percentages and prices above are hypothetical examples, not recommendations. This article was prepared with AI-assisted research and writing under The Money Man editorial process.