
The free version runs on a live Exness, XM or HFM account opened through our links and registered with us (it does not start on demo accounts; you can check how it works in the Strategy Tester). The paid version is sold on MQL5 Market and needs no account registration.
GOLD VIPER EA
aggressive gold breakout (XAUUSD M30)
🌱 4-line summary for beginnersGlossary
- What does this EA do?
- An aggressive EA that runs a gold (XAUUSD) M30 breakout together with three sets of 8 stop-order strategies. Exness 7.7-year test: PF 1.64, max DD 24.1%.
- 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 larger moves on gold and can tolerate a DD around 30%. If this is your first EA, start with one that has a smaller DD.
- After getting it
- Install MT5
- 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
- Check it in the Strategy Tester first, then start on a XAUUSD M30 chart with the minimum lot
Default (Ultra = Standard) ×196.7 / Exness 7.7y · compounding
$10k → $2M
Measured with the default settings (RunMode = Ultra = Standard ×1.0): +19,565% / PF 1.64 / balance DD 21.2% / equity DD 24.1% / 10,340 trades (+99.1% per year). The equity drawdown is 30.3% when measured as the largest percentage drop. Exness XAUUSDm M30, 2019.01-2026.09, $10,000, compounding, MT5 "every tick based on real ticks" mode. History quality is only 8% (real ticks exist for part of the period), so the figures may be on the optimistic side.
⚠ Aggressive EA. Even at default settings the equity drawdown reaches about 30%, and about 38% in Aggressive mode. Trade only with money you can afford to lose.
⚡ The backtest starts at $10,000. The second engine orders at least 0.01 lot, so on small accounts the effective risk is higher than set. For small balances a micro (cent) account is recommended
Verification Status
How far verification has progressed, from backtest to forward testing
- BacktestDone
- Period
- M30 (2019.01.01 - 2026.09.01)
- History quality
- 8% real ticks — real-tick coverage is low for this period, so fill prices are reproduced less accurately
- Trades
- 10340
- PF
- 1.64
- Max DD (relative, equity)
- 30.30% (equity DD at the largest loss in money terms: 24.09%)
- Recommended minimum capital
- $1,000+ recommended
- OOSCaution
- Data source
- MT5 official ticks
- Years verified
- 7.7
- ForwardIn progress
This EA is in forward testing. Results for all EAs are published together on the forward test page.
See all forward tests → - LiveNot started
How it works
Hypothesis: gold forms its strongest initial trends at calm-to-volatile regime transitions. The EA trades only when the ATR regime filter (fast ATR / slow ATR >= 1.2) and EMA50/200 trend agreement confirm a moving market, then enters on a closed-bar breakout of the 32-bar channel with an ATR margin. Exits are ATR-scaled: once group profit reaches the group TP (ATR x 3.0) a group trailing stop (width ATR x 0.4) rides the peak to let winners run, while the group SL (ATR x 1.5) caps the whole basket hard. On adverse moves it averages with same-size grid entries (max 5, no martingale) while the group SL caps the whole basket. Lot size is volatility-normalized risk% (a group-SL hit = 2.3% of balance). v2.13 adds regime-quality sizing: the stronger the volatility regime at entry (volRatio above the 1.2 gate), the larger the lot (up to x1.5) - losing regimes keep the base lot, so drawdown stays nearly unchanged while profits compound faster.
Second engine: 8 fractal stop-order strategies (v2.35, always on)
Since v2.35, alongside the breakout, eight strategies place stop orders at D1 fractal highs and lows (H4 for strategy 2) and trail winners before exit. They are always on and use their own magic range (FB_MagicBase to +7). Of the 10,340 trades at default settings, 2,531 come from this engine (the breakout: 282 trades). AllowBuy/AllowSell apply to all engines; RunMode scales the breakout, this engine and the fourth engine. ★Attach to only one chart (XAUUSD M30) per account. On several charts the orders of the second, third and fourth engines would be duplicated (the former TWIN/PACK setups are discontinued).
Third engine: 8 more stop-order strategies (v2.36, on by default)
v2.36 adds a third engine: eight more stop-order strategies on the same chart, with their own magic numbers (2610020 to 2610027; order comments start with GR8_). It sizes orders from its own unit balance (0.01-0.05 lots per order on a 1,600 USD unit × GR_LotMult) and is not scaled by RunMode. In the 7.7-year backtest it made 5,597 of the 10,340 trades. Set UseReaperEngine = false to switch it off.
Fourth engine: 8 daily-fractal stop-order strategies (v2.38, on by default)
v2.38 adds a fourth engine: eight stop-order strategies placed at daily-chart fractal highs and lows (refreshed once a day, up to eight orders per side), with their own magic numbers (2610060 to 2610067; order comments start with GB1_). Every order carries a stop loss and a take profit. After a fill, the trade is closed at once unless the M1 bar and then the M30 bar close in its direction; winners are moved to break-even and then trailed. Sells are allowed only when the previous day's close is below the 50-day moving average, and positions and pending orders are cleared before the US jobs report. Each order risks 0.25% of the balance (G1_RiskPercent) × RunMode, capped at 5 lots. At the same time the breakout's RiskPercent was lowered from 3.0 to 2.3, so v2.38 reallocates risk rather than adding to it. With the default settings the result moved from PF 1.55 / equity DD 27.8% (v2.37) to PF 1.64 / equity DD 24.1%; 1,930 of the 10,340 trades come from this engine. Up to 58 pending orders were open at the same time, so use an account that allows at least 70 simultaneous orders. Set UseGoldbotEngine = false to switch it off (to return to v2.37 behaviour, also set RiskPercent = 3.0).
Entry & exit timing
- Entry: closed-bar breakout of the 32-bar (M30) channel + ATR x 0.6 margin + EMA50/200 trend agreement
- Regime gates: ATR ratio >= 1.2 (volatility expansion only) + |EMA50-EMA200| >= ATR x 0.5 (trend present)
- Take profit: after the group TP (ATR x 3.0) a trailing stop (trigger ATR x 3.0 / width ATR x 0.4) rides the peak
- Stop loss: group SL = ATR x 1.5, executed by the EA and checked every tick (breakout orders carry no broker-side SL, so keep the EA running)
- Scale-in: same-size grid add every ATR x 1.0 adverse move (max 5, no lot escalation = no martingale)
- Safety: monthly -8% circuit breaker (pauses new baskets for the rest of a losing month) / regime-quality sizing scales lots only on strong regimes (cap x1.5) / emergency close at 150% margin level / trading hours 6-20 server time / Monday-open & Friday-close avoidance
Live-spread backtest
Total return (7.7y compounding)
+19,565% (x196.65)
Profit factor
1.64
Win rate
56.4%
Max balance DD
21.2%
Max equity DD
30.3%
Trades
10,340
The figures above are measured with the default settings (v2.38; the distributed v2.40 uses the same trading logic) on Exness XAUUSDm M30, 2019.01-2026.09, $10,000, compounding. MT5 ran in "every tick based on real ticks" mode, but history quality is 8% (real ticks were stored for only part of the period; the rest is generated from M1 bars). The former v2.13 Dukascopy 22.5-year headline figures are withdrawn because the engine configuration differs.
📈MT5 Strategy Tester Report — GOLD VIPER EA

📋 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
Where it fails / main risks
- Extended ranges: failed breakouts reversing before TP produce consecutive group-SL hits (2020 and early 2024 were such regimes)
- Spread spikes: breakouts right after news or in thin markets suffer slippage and worse TP/SL geometry
- Aggressive mode (×2) reaches 32.3% equity drawdown (37.7% measured as the largest percentage decline). Choose risk above the default (Ultra = Standard) only with money that can withstand large balance swings
- Grid adds are same-size and capped at 5, but floating loss can grow to the group-SL distance while holding through a crash
- The test covers only 7.7 years (2019-2026), mostly a rising gold market. A long stagnation like 2004-2012, when the old version lost in 11 years, has not been tested with the second engine. If such a market returns, long losing streaks and deep drawdowns can occur. Trade only with spare money
The real risk, blow-up triggers, compounding note▾
GOLD VIPER v2.38 is an aggressive gold (XAUUSD) EA that runs four engines on one chart: (1) an M30 volatility-regime breakout (L32 channel close breakout + EMA trend agreement, ATR-scaled group TP/SL), (2) eight always-on strategies that place stop orders at D1/H4 fractal highs and lows, and (3) eight more stop-order strategies sized from their own unit balance (on by default). v2.38 adds a fourth engine: eight stop-order strategies at daily-chart fractal highs and lows, each order risking 0.25% of the balance (on by default). Exness XAUUSDm 7.7 years (2019-2026), $10,000 compounding: ×196.7 / PF 1.64 (history quality 8%). Breakout grid: same lot up to 5, group SL run by the EA (no broker-side SL), no martingale. The distributed v2.40 uses the same trading logic as v2.38; the figures shown are v2.38 measurements.
- ⚠ Aggressive EA. Even at default settings the equity drawdown reaches about 30%, and about 38% in Aggressive mode. Trade only with money you can afford to lose.
- The breakout engine's group SL is executed by the EA itself; no SL is placed at the broker. While the EA is stopped or the VPS is disconnected, the stop-loss does not work, so run it in an always-on environment.
- Withdraw daily, use only spare capital you can afford to lose, keep it under 10% of your portfolio, and prefer a micro (cent) account.
- If you want a low-drawdown defensive EA, pick one with a low equity drawdown from the EA ranking instead.
Measured results by RunMode (v2.38/v2.40, Exness 7.7 years)
| Setting | Result ($10,000 →) | Equity DD | Verdict |
|---|---|---|---|
| Ultra = Standard (default) | $2M | 24.1% | +19,565% / PF 1.64 / balance DD 21.2% / 10,340 trades |
| Defensive (risk x0.5) | $272k | 17.5% | +2,616% / PF 1.79 / balance DD 14.7% / 10,348 trades |
| Aggressive (risk x2) | $10.1M | 32.3% | +100,746% / PF 1.59 / balance DD 28.7% / 10,336 trades |
All three modes were measured over the same period with the same starting balance. Equity DD is MT5's "maximal drawdown" (% at the largest money drawdown). Measured as the largest percentage decline it is 30.3% for the default and 37.7% for Aggressive; this value has not been measured for Defensive. In Aggressive mode, quality sizing and the monthly breaker switch off automatically.
MT4 edition (v2.39, measured separately in the MT4 Strategy Tester — every tick generated from Dukascopy M1 data, not real ticks; XAUUSD M30 (100 oz · 1:500) 2019.01–2026.07, spread 16 pips, $10,000 compounding, about 9,700 trades per mode): Defensive +2,550% / PF 1.72 / eqDD 17.7% · Standard (= Ultra) +25,120% / PF 1.60 / eqDD 24.2% · Aggressive +82,865% / PF 1.57 / eqDD 33.7%. The MT4 edition has no USD basket SL/TP or volume-limit clamp and avoids news by an NFP/FOMC/CPI schedule rule.
Compounding = lot scales with balance (volatility-normalized risk%). Multiples are backtest values starting at $10,000 with no withdrawals and do not guarantee future profits.
Parameters (in .mq5 input order, key ones)
| Parameter | Default | Description |
|---|---|---|
| EntryLookback | 32 | Breakout channel lookback bars (M30) |
| EntryATR_Multi | 0.6 | Breakout margin = ATR x this |
| TrendEMA_Fast / Slow | 50 / 200 | Trend EMAs (fast/slow) |
| UseTrendFilter | true | Require trend agreement (robust, recommended) |
| AllowBuy | true | Allow buys (false = sell-only; both engines) |
| AllowSell | true | Allow sells (false = buy-only; both engines) |
| MinTrendATR | 0.5 | Regime: |EMA gap| >= ATR x this |
| MinVolRatio | 1.2 | Regime: fast ATR / slow ATR >= this |
| GridDistanceATR | 1.0 | Grid spacing = ATR x this |
| MaxGridCount | 5 | Max grid count (same lot) |
| GroupTP_ATR | 3.0 | Group TP = ATR x this |
| GroupSL_ATR | 1.5 | Group SL = ATR x this (executed by the EA; no broker-side SL) |
| UseTrailExit | true | Trail the group past TP instead of a hard TP close (ON by default in v2.11) |
| TrailActivateATR | 3.0 | Start trailing once group profit >= ATR x this (= Group TP) |
| TrailDistATR | 0.4 | Close when group profit retraces ATR x this from its peak |
| BreakevenATR | 0.0 | Lock a breakeven floor once group profit reaches ATR x this (0=off) |
| UseMonthlyLossStop | true | Monthly loss breaker (v2.12): once the month's realized loss hits the trigger, pause new baskets until next month (open basket still managed) |
| MonthlyLossStopPct | 8.0 | Monthly stop trigger % (defined at Standard risk; Defensive auto-scales x0.5; auto-disabled in Aggressive) |
| UseRegimeSizing | true | Regime-quality sizing (v2.13): scales lots up only on strong regimes; losing regimes keep the base lot |
| RegimeSizeSlope / Cap | 0.75 / 1.5 | Scale = 0.75 per volRatio above the 1.2 gate, capped at x1.5. Auto-disabled in Aggressive |
| RiskPercent | 2.3 | Risk % per basket (group-SL hit = this % of balance) |
| FixedBaseBalance | 0 | >0 = risk computed on this fixed base (compounding OFF; equals daily-withdrawal operation). 0 = compound on current balance |
| MaxLotTotal | 5.0 | Total lot cap |
| MaxMarginPercent | 20 | Initial-lot margin cap (% of balance) |
| TradeStartHour / EndHour | 6 / 20 | Trading hours (server time) |
| MaxSpreadPoints | 100 | Max spread (points, with ATR-linked dynamic allowance) |
| EmergencyMarginLevel | 150 | Emergency close-all margin level % |
| RunMode | Ultra (= Standard ×1.0) | Operating mode (Defensive ×0.5 / Standard / Aggressive ×2 / Ultra = default; for this EA Ultra equals Standard ×1.0) |
| MagicNumber | 20260602 | Magic number |
| FB_RiskPercent | 0.5 | Second-engine risk per order, % (loss to the initial SL = this % of balance × RunMode). 0 = FB_FixedLot |
| FB_MaxLot | 5.0 | Second-engine lot cap per order |
| FB_RunS1 … FB_RunS8 | true | On/off for each of the 8 strategies (S2 on H4, the rest on D1) |
| FB_NfpPause | true | On NFP days, close and cancel 15:20-19:30 server time and re-place at 19:30 |
| FB_MagicBase | 2609220 | Second-engine magic base (uses up to +7; the range must not include MagicNumber) |
| UseReaperEngine | true | Third engine on/off (8 stop-order strategies, magic 2610020 to 2610027) |
| GR_LotMult | 1.0 | Third engine lot multiplier (1.0 = 0.01-0.05 lots per order on a 1,600 USD unit). Not affected by RunMode |
| GR_VirtualDeposit | 1600 | Unit balance (USD) the third engine's balance tiers start from |
| UseGoldbotEngine | true | Fourth engine on/off (8 daily-fractal stop-order strategies, magic 2610060 to 2610067) |
| G1_RiskPercent | 0.25 | Fourth engine risk % per order (× RunMode, capped at 5 lots) |
🛡 It ships set to RunMode = Ultra (for this EA, the same ×1.0 as Standard)
GOLD VIPER's headline figures (PF 1.64 / equity DD 24.1% / 99.1% per year) are measured with the shipped default RunMode = Ultra (for this EA the same ×1.0 as Standard). No further changes are needed. Aggressive (×2.0) grows to +100,746% but deepens equity DD to 32.3%, its largest single loss is about 6.6 times that of Standard, and quality sizing and the monthly breaker switch off automatically. For a safer setting, choose Defensive (×0.5, equity DD 17.5%). RunMode scales the breakout, the fractal engine and the fourth engine; the third engine keeps its own lot size.
Always-on chart panel
Once the EA is on the chart, a panel shows its status at a glance.

- 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.
EA Setup Guide
- Copy to the MQL5/Experts folderCopy the .ex5 file to the MQL5/Experts folder inside the MT5 data folder (File > Open Data Folder)
- 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"
- 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
- 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)
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 →
Buy the paid version (MQL5 Market, no account registration)
Buy GOLD VIPER EA
Buy on the official MetaQuotes Market (MQL5 Market). Payment, licensing and automatic updates are all handled inside the MT5 app.
🏷 Launch pricing now — the price steps up every 3 copies sold. The earlier you buy, the lower the price.
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.
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 →