Home >EA Lineup >MEGAMAX DONCHIAN USDJPY

megamax-donchian

Donchian breakout + ATR exit + time-based exit

MEGAMAX DONCHIAN USDJPY EA

USDJPY H1 with-trend breakout (+39.3%/yr / 9.4-yr live · MQL5 Market edition, Ultra mode)

It enters with the trend on an upside break of an N-bar Donchian channel, extends profits with an ATR-based initial SL + trailing stop, and exits on time after a set number of bars — a BUY-only breakout EA.Since the buy direction is the swap-receiving side, it is also advantageous on holding costs over the long term. It uses no averaging-down or martingale whatsoever.In 9.4 years (2017-2026) of live MT5 BT, +2,155% / PF=1.55 / max DD 58.6% (MQL5 Market edition, Ultra mode).

🌱 4-line summary for beginnersGlossary

What does this EA do?
A Donchian (high/low) breakout EA on USDJPY H1. 9.4 years: PF 1.55, DD 58.6% at the ultra-aggressive default.
Price?
Free: register an account with a partner broker and download a copy locked to that account. If you don't want to open an account, buy it on the MQL5 Market (buy-out or rent; the price is shown on the purchase page). Both options are lower on this page.Go to the free download steps ↓
Who it suits
People who want simple rule-based trend following on forex. The default is aggressive, so beginners should lower the risk setting.
After getting it
  1. Install MT5
  2. Free version: put the downloaded file in the MT5 Experts folder. If bought on MQL5, it appears in the MT5 'Market' tab. Drag it onto a chart and set it up
  3. Check it in the Strategy Tester first, then start on a USDJPY H1 chart with the minimum lot
9.4-yr live MT5 BT PF=1.55 (MQL5 Market edition, Ultra mode) · with-trend breakout (no averaging-down)

This Is a Different Thing from the Old MEGAMAX v3.6

The old MEGAMAX EA v3.6 (Asia Range Breakout, 11 pairs) blew up on all pairs in live MT5 verification (redesign required) and was taken down(See the old version's verification results here)。

This EA inherits the name but is a complete redesign. The strategy is changed to a simple USDJPY H1 Donchian channel breakout (BUY-only), and after 17 PDCA optimization cycles in Python, we re-verified 9.4 years (2017-2026) in the live MT5 Strategy Tester and passed — we publish only what passed.

If you used a retired USDJPY EA merged into this one (such as MONTHLY BURST)

Retired USDJPY EAs such as MONTHLY BURST USDJPY are no longer provided and have been merged into this EA, which trades the same USDJPY. To switch, close the old EA's open positions first, then attach this EA. The edition sold on MQL5 Market (v1.52) also incorporates the AUDCAD PEACE method adapted to USDJPY and has an Ultra mode. The site edition available from this page is v1.05 (three modes: Defensive / Standard / Aggressive, Standard by default).

Live MT5 Strategy Tester 9.4-yr BT (USDJPY H1, $10,000) — MQL5 Market edition, Ultra mode

MetricResult
Verification Period2017 – 2026 (9.4 yr)
Profit Factor1.55
Win rate / total trades35.0% / 629
Maximum Drawdown58.6%
Annual (compound)+39.3%/yr

* Measured in the MT5 Strategy Tester on Dukascopy 100% real ticks (every tick, real spreads); these are the figures of the MQL5 Market edition in Ultra mode. The v1.05 distributed on this page has three modes (Defensive / Standard / Aggressive, Standard by default) and no Ultra, so its default risk level differs. See "Run modes" below for per-mode figures.

Profit Factor

1.55

Expectancy

Win rate

35.0%

629 trades

Max DD

58.60%

Equity DD

Annual (compound)

+39.3%

+$3,930/yr (on $10,000)

Attach to: USDJPY H1 — The strategy reads the H1 timeframe. On any other chart it will place no trades at all. When testing in the MT5 Strategy Tester, set the symbol and timeframe to USDJPY H1 as well.

Verification Status

Share on X

How far verification has progressed, from backtest to forward testing

  1. BacktestDone
    Period
    H1 (2017.01.01 - 2026.06.01)
    History quality
    100%
    Trades
    629
    PF
    1.55
    Max DD (relative, equity)
    58.59% (equity DD at the largest loss in money terms: 16.27%)
    Recommended minimum capital
    $1,000+ recommended
  2. OOSDone
    Data source
    MT5 official ticks
    Years verified
    9.4
  3. ForwardIn progress

    This EA is in forward testing. Results for all EAs are published together on the forward test page.

    See all forward tests →
  4. LiveNot started

Design Highlights (eliminating over-optimization)

  • Parameters use the median of the plateau — avoiding single-peak over-optimization
  • Robustness confirmed via 3x-spread stress and walk-forward (IS 2012-2019 / OOS 2020-2025)
  • BUY-only = swap-receiving side. Swap costs don't work against it even when holding long term
  • No averaging-down or martingale. Per-trade risk is fixed with an ATR-based SL

one EA, three pairs at once

MEGAMAX DONCHIAN JPY (multi-pair)

Instead of running USDJPY, GBPJPY and EURJPY on three separate charts, drop ONE EA on ONE chart and it trades all three at once. Each pair runs its own validated config (per-symbol channel / timeframe / trail / hold), and its backtest is byte-identical to the standalone version (USDJPY within 0.4%, GBPJPY/EURJPY exact).

  • • Buy-only Donchian breakout + hard SL + ATR trail + time-exit (same engine as the standalone)
  • • Missing symbols auto-skipped, broker suffix auto-detected (works on any MT5)
  • • One install, one chart, 3-pair diversification (no more 3-chart setup)
↓ Register your account to get it free

Free with account registration (account-locked). Download the multi-pair and per-pair versions from your dashboard after registering.

How the strategy works (entry, stop, target)

On USDJPY H1, it follows Donchian-channel breakouts with an ATR trailing stop — a robust trend follower tested on 9.4 years of data (2017–2026, Dukascopy).

Entry
Buys a breakout above the 40-bar Donchian channel (long only).
Stop loss
Initial ATR×2.0 stop (distributed preset).
Trail / exit
ATR×8 trailing stop to extend the trend, with a 60-bar time stop.
Risk
Balance × 0.5% (low risk, low drawdown). Adjustable via Run-Mode.
Timeframe
USDJPY trends persistently on H1; the published 9.4-year backtest (2017–2026, Ultra mode) gave +2,155% / PF 1.55 over 629 trades.

MEGAMAX DONCHIAN JPY Family (all 9.4-yr live MT5 verified)

The same strategy deployed to several JPY crosses. With low correlation, it suits diversified operation. All are live MT5 Strategy Tester measurements (every-tick equivalent / real spread) for 2017-2026.

Pair / TFPFMax DDWin RateTrades15 yr
USDJPY / H1 ★ main N40 Trailing1.5558.6%35.0%629+2,155%
EURJPY / H1 N20/Trail10 (2017-2026)1.5133.3%25.2%571+552.6%
GBPJPY / H4 N20/Trail3 (2017-2026)1.3256.8%42.6%256+875%

* EURJPY and GBPJPY are distributed together as one "MEGAMAX DONCHIAN JPY pack" (the EA has the EURJPY H1 and GBPJPY H4 settings built in). See the manual in the zip for each pair. The USDJPY row shows the MQL5 Market edition in Ultra mode.

📈MT5 Strategy Tester Report — MEGAMAX DONCHIAN USDJPY

🏆 MT5 Official Strategy Tester Result · USDJPY / H1Open original in new tab →
MEGAMAX DONCHIAN USDJPY Strategy Tester Report

📋 About this report

  • Official report generated by the MT5 Strategy Tester (real-tick data)
  • Multi-year real price data with the every-tick (real ticks) model
  • Balance curve (blue) / Equity curve (green) shows floating losses too
  • Past results do not guarantee future profits

📈MT5 Strategy Tester Report — MEGAMAX DONCHIAN EURJPY

🏆 MT5 Official Strategy Tester Result · EURJPY / H1Open original in new tab →

📋 About this report

  • Official report generated by the MT5 Strategy Tester (real-tick data)
  • Multi-year real price data with the every-tick (real ticks) model
  • Balance curve (blue) / Equity curve (green) shows floating losses too
  • Past results do not guarantee future profits

📈MT5 Strategy Tester Report — MEGAMAX DONCHIAN GBPJPY

🏆 MT5 Official Strategy Tester Result · GBPJPY / H4Open original in new tab →

📋 About this report

  • Official report generated by the MT5 Strategy Tester (real-tick data)
  • Multi-year real price data with the every-tick (real ticks) model
  • Balance curve (blue) / Equity curve (green) shows floating losses too
  • Past results do not guarantee future profits

When it does not work and main risks

  • In range-bound markets, breakouts reverse quickly and stop-losses come one after another.
  • The win rate is about 35%. Losing streaks happen; in Ultra mode of the MQL5 Market edition the maximum (relative) drawdown was 58.6%, meaning the account fell below half at one point. The edition distributed on this page ships in Standard mode.
  • Figures are from a backtest on USDJPY H1 with 9.4 years of Dukascopy real ticks and 629 trades. They do not guarantee future results.
  • On accounts with wide spreads, or around economic releases, fills get worse and results deteriorate.
  • Trade only with spare money you can afford to lose.

Run Mode

Measured

The "RunMode" setting switches how aggressively the EA trades. On EAs whose chart panel has run-mode buttons, you can also switch with one click (applies from the next new entry). Only the lot (risk) changes — entry/exit logic, symbol and timeframe stay the same.

This EA ships set to Standard. The version distributed on this site has three run modes: Defensive, Standard and Aggressive (Ultra is in the MQL5 Market version only).

Defensive

×0.5

Half the Standard lot. For capital preservation or first-time automated trading.

Total: +71%PF: 1.59Max DD: 4.8%

Standard (recommended)

×1.0

The reference risk level. Start here.

Not measured

Aggressive

×2.0

Twice the Standard lot. Drawdowns deepen and the risk of ruin rises. Use only money you can afford to lose.

Total: +716%PF: 1.55Max DD: 16.4% (relative 19.5%)

Measured backtest: USDJPY H1, 2017-01 – 2026-05, 629 trades, $10,000 start, MT5 Strategy Tester. Returns are totals for the whole period, not annual. Every mode trades the same signals; only the lot differs.

Past performance does not guarantee future results. With compounding on, lots adjust automatically to the balance.

Always-on chart panel

Once the EA is on the chart, a panel shows its status at a glance.

EA chart panel
  • Switch the run mode with a button on the chart (no need to reopen the settings)
  • Choose the display language from 11 languages
  • Live P/L, maximum drawdown and EA net profit
  • Open positions with distance to SL

Screens show sample values for illustration.

Recommended Settings (live-verified parameters, .set included)

The download zip includes the trailing version EA (MEGAMAX_DONCHIAN_TRAIL_EA) and the verified preset MEGAMAX_DONCHIAN_USDJPY_H1_TRAIL.set.Be sure to apply it to a USDJPY H1 chart and load this .set in the input fields (a different timeframe will not reproduce the results above).

Pair / TimeframeUSDJPY / H1
N_Channel (Donchian period)40
SL_ATR / Trail_ATR (trailing)2.0 / 8.0
HoldBars (time-based exit) / ATR_Period60 / 14
Direction / RiskPercentBUY-only (AllowSell=false) / 0.5%

All Parameters

All 57 inputs shown in MT5 (EA core + shared modules). Strategy-core values are pre-optimized — keep them at defaults; tune only the operational ones as needed.

ParameterDefaultDescription
General
VersionCheck_EnabletrueEnable automatic update notifications.
EA_Slugmegamax-donchian-usdjpyFXEA365 site EA identifier (do not change).
RunModeMODE_STANDARDRun mode (Defensive x0.5 / Standard x1.0 / Aggressive x2.0). Switches the lot multiplier.
Economic Event Filter
EconFilter_EnabletrueAvoid trading around high-impact economic events.
EconFilter_AvoidNFPtrueAvoid NFP (1st Friday each month).
EconFilter_AvoidFOMCtrueAvoid FOMC (US Federal Open Market Committee).
EconFilter_AvoidCPItrueAvoid CPI (US consumer price index).
EconFilter_AvoidWeekendtrueAvoid weekend risk (late Fri / early Mon).
EconFilter_AvoidHoursBefore2Avoid N hours before the release.
EconFilter_AvoidHoursAfter1Avoid N hours after the release.
EconFilter_ServerGMTOffset3Server-time GMT offset (summer=3 / winter=2).
EconFilter_VerbosefalseVerbose filter logging.
EconFilter_UseCalendartrueAuto-fetch from MT5 economic calendar (falls back to NFP/CPI rules where unavailable).
EconFilter_MinImportance2Min calendar importance (1=low+ / 2=medium+ / 3=high only).
EconFilter_CurrenciesUSDCalendar target currencies (CSV, e.g. USD,EUR,JPY).
EconFilter_StopImportance3Fully stop new entries at this importance or above.
EconFilter_StopBeforeMin120Stop: N minutes before release.
EconFilter_StopAfterMin60Stop: N minutes after release.
EconFilter_ReduceLotFactor0.5Lot factor on medium impact (reduce instead of stop).
EconFilter_ReduceBeforeMin30Reduce lot: N minutes before.
EconFilter_ReduceAfterMin15Reduce lot: N minutes after.
Safety Guard
Guard_EnabletrueEnable the safety guard (forward only).
Guard_EmergencyMargin120.0Close all if margin level falls below this % (0=off).
Guard_DailyLossPct8.0Stop new entries for the day at this daily loss % (0=off).
Guard_DailyLossClosefalseAlso close open positions when the daily loss is hit.
Guard_MaxConsecLoss0Stop new entries for the day after N consecutive losses (0=off).
Guard_FridayClosefalseClose everything late Friday.
Guard_FridayCloseHour20Friday close-all hour (server time).
News Protect
Guard_NewsProtectMode00=off / 1=SL to break-even / 2=half close / 3=close all.
Guard_NewsProtectMin15Run protection N minutes before high-impact events.
Dashboard / Notify
Notify_PushtrueMT5 mobile push notifications (requires MetaQuotes ID).
Notify_EmailfalseEmail notifications (requires MT5 email setup).
Notify_WebhookURL—Generic webhook URL (Discord/Slack, etc.; empty=off).
Notify_MarginAlert150.0Alert when margin level falls below this %.
Notify_DailySummarytrueSend a daily summary at a set time.
Notify_SummaryHour6Daily summary send hour (server time, 0-23).
Dash_TradeCSVtrueRecord all fills to CSV (MQL5/Files).
Dash_PauseButtontrueShow a pause button on the chart.
Dash_ShowPaneltrueShow the status panel on the chart (false = plain text)
Dash_LanguageFXLANG_AUTOPanel language (Auto = terminal language)
Notify_NewsPrewarnMin60Pre-warn N minutes before entries are halted (0=off).
Donchian Core
N_Channel40Donchian lookback bars (XAUUSD/EURJPY=20, USDJPY/GBPJPY=10)
SL_ATR2.0SL = ATR x this (wider for gold).
Trail_ATR8.0Trailing distance (ATR multiple)
HoldBars60Hold timeout (bars; 20 for EURJPY/USDJPY)
ATR_Period14ATR (volatility) calculation period.
MinATR_Abs0.0Min ATR (price units; 0=off, e.g. 0.03 for JPY)
Direction (BUY-only)
AllowBuytrueAllow buy entries.
AllowSellfalseAllow sell entries (often OFF for gold's uptrend bias).
Risk
RiskPercent0.5Risk per trade as a % of account balance.Def 0.25Std 0.5Agg 1
FixedBaseBalance00 = compounding (lot follows balance). >0 = use this fixed base (no compounding / daily-withdrawal mode).
FixedLot0.0Lot size used when fixed-lot trading is on.Def 0Std 0Agg 0
MaxLot5.0Hard cap on total lots (prevents runaway / oversized positions).
MagicNumber20260605Unique ID so the EA never interferes with others (fixed per EA).
AllowCenttrueAllow cent / micro accounts
DetailedLogtrueLogs wait/skip reasons, entries and exits to the Journal (forward only).
LogVerbosefalseVerbose tier: log every-bar evaluation detail

Defaults and descriptions follow the EA source. Lot inputs show the effective value after the run-mode multiplier (Defensive x0.5 / Standard x1.0 / Aggressive x2.0). See the bundled MANUAL.html for details.

EA Setup Guide

  1. Copy to the MQL5/Experts folderCopy the .ex5 file to the MQL5/Experts folder inside the MT5 data folder (File > Open Data Folder)
  2. Allow fxea365.com in MT5 WebRequest settingsIn MT5 open Tools → Options → Expert Advisors, tick "Allow WebRequest for listed URL", add https://fxea365.com and press OK. The EA checks your account licence there on start-up; without this it stops with "code=4014"
  3. Attach the EA to a chartOpen the chart for the target currency pair, drag the EA from the Navigator panel onto the chart, check "Allow Algo Trading," and click OK
  4. Turn on the Algo Trading buttonTurn on the "Algo Trading" button (green) in the MT5 toolbar. A smiley face (😊) in the top right of the chart means it is running

How to Set Up an EA in MT5 | From Installation to Operation →

Free download (register your account number)

⭐ Try it free first

STEP 1 Prepare your account

Using the EA requires an MT5 account opened through our referral link. If you already have an account, please create an additional account.

No account yet — open a new account via the links below

Adding an account — create an additional account in your member pageSee how →

STEP 2 Register your account number and download (free)

Please check before applying

The free EA is available for MT5 accounts opened through our referral link. When you enter your account number we check the linkage on the spot, and show you how to fix it if it is not confirmed.

Free registration; your account number is used only for EA license activation

Buy the paid version (MQL5 Market, no account registration)

Buy MEGAMAX DONCHIAN EA

Buy on the official MetaQuotes Market (MQL5 Market). Payment, licensing and automatic updates are all handled inside the MT5 app.

Check the MQL5 product listing for current pricing, rental terms and availability.

Buy on MQL5 Market (MT5) →Buy on MQL5 Market (MT4) →

Buy on the official MetaQuotes Market — install directly in MT5 with automatic updates. No account registration needed.

Before you buy

  • Check MT4/MT5 compatibility and the current price on the MQL5 product page.
  • Free-distribution and MQL5 editions may have different license terms; verify before purchase.
  • Backtest results do not guarantee live returns. Review maximum drawdown and the test period.
Review published demo forward tests and update dates →

Related EAs

Frequently asked questions

What is the difference between the free and paid versions?
The free version works once you register the number of an Exness, XMTrading or HFM trading account opened through our referral link. The paid version is a one-time purchase on MQL5 Market and needs no account registration. For some EAs the version or default settings differ between the two (see the version shown on each page).
What happens if I change accounts?
The free version runs only on the account number you registered. To use it on another account, register again with that account number.
Can I backtest it?
Yes. The MT5/MT4 Strategy Tester does not check the account, so you can test on any account type.
Can I use it on a demo account?
No. The free version runs only on the registered live trading account. Use the Strategy Tester to check how it behaves.
What if the EA does not trade?
See "Common problems and fixes" in the setup guide. How to Set Up an EA in MT5 | From Installation to Operation →

Articles about this EA

📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators

* Privacy strictly protected. You can unsubscribe at any time.