Free Forex indicator · MT4 / MT5

Donchian Channel for MT4 & MT5: Settings, Alerts and Free Download

See a rolling price range, its midpoint and optional inner zones. Understand the actual Donchian Ultimate settings and alert rules, then download the free source package for your platform.

Reviewed by ForexBestRobots Editorial Team

Original developerEarnForex.com
PlatformsDesktop MT4 · MT5
LicenseApache 2.0 · Free
On this page

What Donchian Ultimate displays

Donchian Ultimate 1.00 by EarnForex draws a rolling price channel directly on the chart. The default upper line is the highest High over 20 candles; the lower line is the lowest Low. A blue midpoint sits halfway between them. Optional shaded resistance and support spans add inner boundaries.

The display helps you compare the current price with a recent range and notice expansion or compression. The spans are calculated ranges, not levels guaranteed to hold. This indicator displays information and can send notifications; it does not place orders or manage actual stop-loss orders.

The 20-candle range, five price modes and Shift

With PriceType=PRICE_HH_LL, upper = highest High, lower = lowest Low and midpoint = (upper + lower) / 2 over the selected period. The resistance span runs from the highest Low to the upper line; the support span runs from the lower line to the lowest High. These inner zones can overlap or collapse.

The other four modes use: averages of highest High and highest Open / lowest Low and lowest Open; the corresponding averages with Close; highest and lowest Open; or highest and lowest Close. The source also adjusts inner boundaries for the two average modes. A Close-only channel can be narrower because it excludes wick extremes.

Shift changes the historical chart-candle lookup before mapping it to the selected timeframe. On the same timeframe, Shift=0 includes the evaluated candle. Shift=1 uses the preceding 20 candles, excluding that candle. A valid close cannot be above its own inclusive highest High or below its inclusive lowest Low; compare with the previous range when studying an outer breakout. Shift is not simply a cosmetic displacement.

All inputs and original defaults

These are the defaults in the unmodified version 1.00 sources. Period is named IndPeriod in MT4 and InpPeriod in MT5. Use a positive period; the original source does not provide comprehensive input validation. Defaults are not demonstrated optimal settings.

InputDefaultPractical meaning
IndPeriod (MT4) / InpPeriod (MT5)20Number of candles in the selected channel timeframe.
InpTimeframePERIOD_CURRENTCurrent uses the chart timeframe. A lower requested timeframe is raised to the chart timeframe.
PriceTypePRICE_HH_LLSelects one of five boundary definitions; default uses High and Low extremes.
Shift0Historical chart-candle offset before timeframe mapping. Zero includes the evaluated candle on the same timeframe.
IsShowResistanceSpantrueDisplays the resistance span. Hiding it also clears the inner buffer used by its zone-entry alert.
IsShowSupportSpantrueDisplays the support span. Hiding it also clears the inner buffer used by its zone-entry alert.
AlertCandlePreviousSelects the previous completed chart candle; Current selects the forming chart candle.
IsAlertMidLineBullishCrossingtrueEnables the bullish candle-body/midpoint event.
IsAlertMidLineBearishCrossingtrueEnables the bearish candle-body/midpoint event.
IsAlertCandleCloseInsideResistancetrueEnables the event for a body entering the resistance span.
IsAlertCandleCloseInsideSupporttrueEnables the event for a body entering the support span.
IsShowAlertfalseDelivers terminal popup alerts when an enabled event occurs.
IsSendEmailfalseSends email, subject to terminal email configuration.
IsSendNotificationfalseSends push messages, subject to terminal notification configuration.

Real EUR/USD charts: range, offset and price mode

These original charts reconstruct the same-timeframe calculation from archived Yahoo Finance EURUSD=X hourly OHLC quotes. All times are UTC, with Period=20 and Timeframe=Current. They are source-based illustrations, not screenshots or execution tests from MetaTrader.

Default High/Low channel with inner zones and midpoint. A and B mark the first two candle bodies crossing their calculated midpoint in this window. They are analytical events, not executed trades.
Default High/Low channel with inner zones and midpoint. A and B mark the first two candle bodies crossing their calculated midpoint in this window. They are analytical events, not executed trades.2025-06-09 00:00 — 2025-06-11 23:00 UTC · 72 candles
The same candles with Shift=0 above and Shift=1 below. The first channel includes the evaluated candle; the second uses its preceding range. This changes what an outer breakout comparison means.
The same candles with Shift=0 above and Shift=1 below. The first channel includes the evaluated candle; the second uses its preceding range. This changes what an outer breakout comparison means.2025-06-16 00:00 — 2025-06-18 23:00 UTC · 72 candles
High/Low and Close-only channels on identical candles, both with Period=20 and Shift=0. The narrower Close-only range omits wick extremes; this does not establish better trading results.
High/Low and Close-only channels on identical candles, both with Period=20 and Shift=0. The narrower Close-only range omits wick extremes; this does not establish better trading results.2025-06-16 00:00 — 2025-06-18 23:00 UTC · 72 candles

The provider does not identify these quotes as broker-specific Bid or Ask execution prices. Feed differences and terminal history can affect readings. No spread, fill or profitability is measured. Scroll charts horizontally on narrow screens.

Download the illustrated readings (CSV) · 1Download the illustrated readings (CSV) · 2

What the four alert events actually require

The four event switches are true by default, but all delivery channels are false. For a popup, enable IsShowAlert=true and retain the desired event switches. Email and push also require terminal configuration. Initial conditions are recorded on attachment; flags reset with each new chart candle.

A bullish midpoint alert requires the selected candle to open strictly below its own calculated midpoint and close strictly above it. A bearish alert reverses those comparisons. This is a candle-body crossing, not a comparison of two consecutive closes. A gap opening above the line and closing above it does not satisfy the bullish rule.

A resistance-span event requires Open below the inner boundary and Close strictly between that boundary and the upper line. The support event requires Open above its inner boundary and Close strictly between the lower line and that boundary. Equality does not qualify; a candle opening and closing inside a span does not qualify. These are not outer-band breakout alerts.

Install and compile the source in MetaEditor

The official version 1.00 packages contain MQ4 or MQ5 source and the original icon. They do not include compiled EX4 or EX5 files. Use the source for your own desktop platform.

  1. Download and extract the MT4 or MT5 ZIP.
  2. In MetaTrader, select File → Open Data Folder and open MQL4 or MQL5.
  3. Copy the archive’s Indicators and Files folders into that platform folder, preserving their contents.
  4. Open Donchian Ultimate.mq4 or Donchian Ultimate.mq5 in the matching MetaEditor. Press F7 / Compile and inspect the compiler messages. A successful compile creates the executable beside the source.
  5. Refresh Navigator → Indicators or restart the terminal. Attach Donchian Ultimate to a demo chart; check inputs, history and Experts/Journal messages before enabling notifications.

ForexBestRobots has checked the original files and reconstructed calculations. We have not compiled or executed these sources in a desktop terminal. Resolve any compiler errors before trying to attach the indicator.

Download Donchian Ultimate 1.00 free

Each source ZIP contains the unmodified author files, original icon, full Apache 2.0 license, installation notes and SHA-256 checksums. Download directly without registering or opening a broker account. Compilation in the matching MetaEditor is required.

EarnForex.com remains the original developer. ForexBestRobots supplies this review, original charts and packaging notes. We preserve the author’s copyright notices and source bytes; no program modifications are included.

Free source ZIP · v1.00 · Compile in MetaEditor

Forming candles, higher timeframes and signal limits

Current-candle highs, lows, closes and derived boundaries can change before the candle finishes. Previous selects the preceding chart candle. On an H1 chart with an H4 channel, that H1 candle can still belong to an unfinished H4 candle; mapped historical readings can change as the H4 range develops. Previous alone is not a guarantee of fixed higher-timeframe values.

Likewise, Shift=1 on an H1 chart moves the lookup back one H1 candle. It may still map to the same forming H4 candle. To read a completed H4 candle directly, use an H4 chart, Timeframe=Current and AlertCandle=Previous. Our numerical examples check same-timeframe H1 calculations; they do not certify native multi-timeframe execution.

A touch, body crossing or previous-range breakout does not establish a profitable entry. Larger periods, price modes and timeframe choices change the range definition. Evaluate a complete strategy, costs and risk separately. Different broker feeds and history corrections can also change historical levels.

Frequently asked questions

Is this Donchian download free?

Yes. The original source is distributed under Apache 2.0 with its license and attribution. No registration is required on ForexBestRobots.

Why is there no EX4 or EX5 in the ZIP?

The official 1.00 packages are source-only. Open the matching MQ4 or MQ5 in MetaEditor and compile it; our package preserves the author’s original files.

Why does a close not break the default High/Low channel?

Shift=0 on the same timeframe includes that candle’s High and Low. For a comparison with the preceding 20-candle range, use Shift=1 on that same timeframe.

Does Previous freeze a higher-timeframe channel?

No. It selects a completed chart candle, which can still lie within an unfinished higher-timeframe candle. Read completed higher-timeframe candles directly on that timeframe.

Does it alert on every outer breakout?

No. The four supplied events concern candle-body midpoint crossings and entries into inner spans. They are not outer-channel breakout events.

Sources and review scope

We matched both official source files to the pinned Apache-licensed repository. A direct extrema implementation and an independent rolling calculation were compared across all five modes, three periods and three offsets on the archived H1 quotes. This is a source-level reconstruction, not a native terminal test or strategy backtest.