Categories

The Donchian Channel is one of the oldest breakout tools in trading, best known as the entry signal behind the original Turtle Traders’ trend-following system. Donchian Channels System brings that same N-period high/low channel to MetaTrader 5, adds a shaded fill and color-coded breakout candles, and gives you five different ways to define the channel’s upper and lower extremes. It is free to download and installs as a standard MT5 chart indicator.
What Is the Donchian Channels System Indicator?
Donchian Channels System is an MT5 chart-window indicator that plots an upper and lower boundary based on the highest and lowest price over the last DonchianPeriod bars (20 by default), with the area between them shaded and the boundary lines colored separately (a MediumSeaGreen upper line and a Magenta lower line by default). A fourth plot overlays color-coded candles on any bar that closes outside the channel, using a five-color palette to distinguish a bullish breakout above the upper band from a bearish breakout below the lower band.
The Extremes input controls exactly which price series define the channel: HIGH_LOW (the default) uses the highest high and lowest low, while HIGH_LOW_OPEN, HIGH_LOW_CLOSE, OPEN_HIGH_LOW, and CLOSE_HIGH_LOW blend in the Open or Close price for a slightly different, sometimes tighter, channel construction. A Margins input (default -2) then pads the raw channel outward or inward by a percentage of the channel’s width – with the default negative value, the channel is widened by 2% beyond the raw N-bar high/low rather than sitting exactly on it, giving price a small buffer before a “breakout” bar is flagged.
A Shift input (default 2) offsets the channel lines and fill forward by that many bars on the chart for visual clarity; it does not affect the color-coded breakout candles, which are always plotted at their true bar position.
Key Features
- Classic N-period Donchian channel – upper/lower bands built from the highest and lowest price over DonchianPeriod bars, shaded between them.
- Five extreme-calculation modes – HIGH_LOW, HIGH_LOW_OPEN, HIGH_LOW_CLOSE, OPEN_HIGH_LOW, and CLOSE_HIGH_LOW let you choose exactly which price data defines the channel.
- Color-coded breakout candles – a dedicated candle plot highlights bars that close above the upper band or below the lower band, in different colors depending on whether that bar was bullish or bearish.
- Adjustable channel padding – the Margins input widens or tightens the channel by a percentage of its width, changing how much of a move outside the raw high/low counts as a breakout.
- Configurable visual shift – the Shift input offsets the channel lines forward for a cleaner read against current price action.
- Dynamic indicator name – the chart label automatically updates to show the current DonchianPeriod setting.
How to Use It
Copy the .mq5 file into the MQL5/Indicators folder in your MT5 data directory (File > Open Data Folder), refresh the Navigator, and drag the indicator onto a chart. The shaded channel and its upper/lower lines will appear immediately once enough bars have loaded to satisfy the DonchianPeriod plus Shift requirement.
The classic Donchian breakout read is straightforward: a close above the upper (green) line marks a new N-bar high and is read as bullish breakout pressure, while a close below the lower (magenta) line marks a new N-bar low and is read as bearish breakout pressure – the indicator highlights exactly these bars automatically by recoloring the candle. Trend-following traders typically use a break of the upper band as a long entry signal and a break of the lower band as either a short entry or an exit signal for an existing long, often using the opposite band (or its midpoint) as a trailing stop reference as the channel migrates with price.
Because the channel is a straightforward rolling high/low, it will naturally stay wide and choppy in a ranging market and only extend meaningfully during a real directional move – treat frequent alternating breakouts on both sides as a signal that the current market isn’t trending strongly rather than a series of independent trade signals.
Best Timeframes / Best Use Cases
The 20-period default lookback mirrors the classic Turtle Trading entry window, which was originally applied to daily charts, making Daily and H4 natural starting points for trend-following breakout use. The indicator itself has no timeframe restriction in the code, so shorter-period traders can lower DonchianPeriod for faster intraday channels, but the wider the lookback relative to your timeframe, the more the channel will filter out minor noise in favor of genuine directional breaks.
Final Thoughts
Donchian Channels System packages a trading-history staple – the rolling N-bar high/low breakout channel – into a modern MT5 indicator with visual breakout highlighting and configurable channel construction. It won’t tell you whether a breakout will hold, but as a clean, rules-based way to see exactly where price has and hasn’t traded over your chosen lookback, it remains one of the simplest trend-following tools available.
- DonchianPeriod (default 20) — Number of bars used to calculate the highest and lowest price that define the channel.
- Extremes (default HIGH_LOW) — Which price series (High/Low, or blends with Open/Close) define the channel's upper and lower boundaries.
- Margins (default -2) — Percentage of the channel's width used to pad it outward (negative) or shrink it inward (positive) relative to the raw high/low.
- Shift (default 2) — Number of bars the channel lines and shaded fill are visually offset forward on the chart; does not affect the breakout candle plot.
FAQs About the MT4 Donchian Channels System Indicator MT5
Does the Donchian Channels System indicator repaint?
No. Each closed bar’s upper/lower channel value is calculated only from that bar and the DonchianPeriod bars before it, so historical channel values and breakout candle colors do not change after the bar closes. Only the currently forming bar’s own reading can still shift until it closes, which is normal for any rolling-window indicator.
What does the Margins input actually do?
It pads the raw N-bar high/low channel by a percentage of the channel’s width. The default value of -2 widens the channel by 2% beyond the literal highest high and lowest low; a positive value would instead shrink the channel inward.
What are the colored candles for?
A dedicated plot recolors any bar that closes above the upper band or below the lower band, using different colors depending on whether that breakout bar closed bullish or bearish, so breakouts are visible at a glance.
What does the Extremes input change?
It selects which price series define the channel boundaries: the default HIGH_LOW uses the highest high and lowest low, while the other four modes blend in Open or Close price for a different channel construction.
Why does the channel look shifted from the current price?
The Shift input (default 2) offsets the channel lines and shaded fill forward by that many bars for visual clarity. It does not change the underlying calculation or the breakout candle plot.
What lookback period does it use by default?
DonchianPeriod defaults to 20 bars, matching the classic 20-day breakout window used in the original Turtle Trading system.
Donchian Channels System Indicator MT5
The Donchian Channel is one of the oldest breakout tools in trading, best known as the entry signal behind the original Turtle Traders' trend-following system. Donchian Channels System brings that same N-period high/low channel to MetaTrader 5, adds a shaded fill and color-coded breakout candles, and gives you five different ways to define the channel's…
Download the Donchian Channels System Indicator MT5