TradeReign
Back to HomeEducation HubCompatibilityAboutDisclosures
Futures Indicators

How to Use Donchian Channels for Futures Breakouts Compare the Close With the Previous 20 Bars

Use this five-minute MES example to see why the upper band can rise before a close-based breakout qualifies.

Quick Answer

For a 20-bar Donchian breakout, record the high and low of the previous 20 completed candles. Then compare the new candle’s close with those levels. A close strictly above the prior high passes a close-based upside rule. A wick above it or a close exactly at it does not.

Start 7-Day TrialMore Guides

Read four decisions from the same MES chart

At 10:45 a.m. ET, the prior upper band is 6,004.00. MES trades up to 6,004.75 and closes at 6,003.50. The wick raises the current upper band to 6,004.75, so this is the prior upper value for the 10:50 check. The 10:50 close equals that level. An exercise that requires a close strictly higher still has no breakout.

At 10:55 the close is 6,005.00, above the prior 6,004.75 band. Freeze 6,004.75 if your rule requires a second close beyond the original break level. The 11:00 close at 6,005.25 passes that test even though the rolling prior band has advanced to 6,005.50. A rule that requires another fresh 20-bar high on the second close would give a different answer.

A wick, an equal close and a Donchian breakout

Synthetic MES 5-minute candles. Times are bar closes in ET.

Violet is the high of the prior 20 completed bars and blue is their low. The dotted line at 6,004.75 shows the level used to judge the 11:00 follow-through. Markers 1–4 match the table in order.

Four marked candles and their upper bands
Close ETPrior upperPrice closeCurrent upper
10:456,004.006,003.506,004.75
10:506,004.756,004.756,004.75
10:556,004.756,005.006,005.50
11:006,005.506,005.256,005.50

Find the previous band in TradingView and NinjaTrader

In TradingView, add the built-in Donchian Channels indicator. Set Length to 20, Timeframe to Chart and Offset to 0. Read the Upper or Lower plot on the previous completed bar using the crosshair or Data Window. If you draw a horizontal reference through that value, keep it fixed while you reveal the candidate candle in replay.

In NinjaTrader Desktop, open Indicators, add Donchian Channel and set Period to 20 on the chart’s price series. Read the prior completed bar in the Data Box. In a NinjaScript calculation evaluated on bar close, the upper and lower plots at one bar ago represent the prior bands. Match the dated contract, bar interval and trading-hours template if the platforms produce different levels.

Choose what counts as a breakout before opening replay

The upper and lower bands track the highest high and lowest low over the selected window. The center is halfway between them. A length of 20 on five-minute bars uses 20 chart candles. On a daily chart, the same setting uses 20 daily candles. The example has 20 prior fictional candles to seed the first visible band.

For a downside exercise, compare the new close with the lowest low of the previous 20 completed bars. Record whether you require an intrabar touch, a strict outside close, or a second close beyond the original edge. For each attempt, note the band before the breakout candle, the high and low of that candle, its close and the result of your rule. For any simulated fill, state your fill model and costs separately.

Sources

Official References

Platform details on this page were checked against these official resources.

TradingView Donchian ChannelsCheck the channel calculation, default length and chart settings.NinjaTrader Desktop indicatorsFind the Donchian Channel in the built-in indicator list.NinjaTrader Donchian Channel referenceCheck how the upper and lower plot values are indexed by bars ago.
Related Guides

Keep Building the Rule System

Compare a Bollinger Band squeeze

See how standard deviation bands and a fixed range can give different answers.

Read a false futures breakout

Use the price close and the original range to evaluate a break.

Practice in TradingView Bar Replay

Move one candle at a time and record when each condition is visible.

FAQ

Common Questions

Why does a candle’s close fail to break above its current Donchian upper band?

If the band includes the candle being evaluated, the candle’s high is part of the maximum. Its close cannot exceed its own high. Compare with the previous bar’s band for a strict close-based breakout.

Is a Donchian breakout the same as a Bollinger Band breakout?

Donchian bands come from price highs and lows. Bollinger Bands use a moving average and standard deviation. The levels can differ on the same candles.

Risk Disclosure

Futures trading contains substantial risk and is not suitable for every investor. TradeReign is a trading-discipline and rule-enforcement application. It does not provide trading advice, trade signals, investment recommendations, or performance guarantees.

TradeReign is not a broker-dealer, futures commission merchant, or investment advisor.

Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Only risk capital - money that can be lost without jeopardizing financial security or lifestyle - should be used for trading. Past performance is not necessarily indicative of future results.