Inspect and modify an M5 hedge-grid and basket-recovery system with MQL5 source, test presets and research notes. Start with the mechanism, risks and limits of the historical simulations.
One-time purchase of the source and research toolkit
MTR FullSystemEA is an MT5 Expert Advisor for the XAUUSD M5 reference setup. It reads market conditions and manages groups of positions as baskets. Its hedge-grid and recovery logic can add exposure after an adverse price move, aiming to close the basket together.
Adding positions does not remove a loss. A persistent adverse trend, wider spreads or delayed execution can produce large losses. A per-cycle stop is not a ceiling on account drawdown.
The package contains MQL5 source, test presets, research notes and simulation tools for inspecting and modifying the system. It suits traders and developers prepared to review code and run their own tests. Check your broker’s account conditions and any prop-firm rules before use.

This inventory describes the source files; the source download is part of the purchase.
MTR_FullSystemEA.mq5
MT5 entry-point · OnTick dispatch · composes all 20 includes · commercial safety gate (AllowLiveRetail=false by default)
HedgeGridEngine.mqh
Primary hedge-grid engine · close-mode + hedge-exec dispatch · pending-opposite-limit vs active-market-on-fill modes
RangeGridEngine.mqh
Range-mode order routing · one basket per side · side-mutex enforced · basket-TP / hard-DD close only · no hedge, no martingale
ReversalConfluenceEngine.mqh
Read-only confluence scorer for Sleeve A reversal entries · emits score+flags+reason · never mutates basket state
RecoveryEngine.mqh
Drawdown ladders · MAE-ATR + age thresholds for warning / recovery / crisis / forced exits
QuantGridController.mqh
Audit + telemetry controller · regime probability · drift signals · inventory pressure · EV(add_order) · observation-only by default
TrendGridFreezeEngine.mqh
Trend-grid freeze (shadow mode) · stops INITIAL_GRID / LADDER_GRID in strong trends · leaves RECOVERY / HEDGE / BASKET_CLOSE untouched
RegimeScore.mqh
Donchian regime score · range / trend / danger scores in [0, 1] · computed on closed M5 bars only · no lookahead
ModeStateMachine.mqh
5-mode state machine · DANGER_PAUSE / WAIT / TREND_FOLLOW / RANGE_GRID / re-entry cooldown · hysteresis + per-mode cooldown
RegimeEngine.mqh
Market regime engine · ATR H1+M5 · EMA H1 · ADX H1 · Donchian · returns the active regime string
BasketManager.mqh
Basket lifecycle orchestrator · composes Zone / GridAdd / BasketTP / Recovery / Cashflow / Composer / TradeExecutor · owns MTRBasket struct
TradeExecutor.mqh
Order send · wraps CTrade + CPositionInfo · symbol + magic · tester-only gate by default
ZoneEngine.mqh
Zone-event emitter · MTRZoneEvent { kind, side, zone_id, top, bottom, reason, ts }
Composer.mqh
Sleeve capital allocator · A_MEANREV 60% / B_TRENDRESCUE 25% / C_CRISIS 15% · per-sleeve usage tracking
Cashflow.mqh
Equity ledger · trading vs banked equity · realized P&L · withdrawal-level checkpoint
GridAdd.mqh
Grid spacing rules · m_grid_pct (0.0025) + m_grid_atr_mult (0.35) · adds bounded ≥ 0
BasketTP.mqh
Basket take-profit target · ATR-H1 × m_atr_multiplier (default 0.35)
ChartVisualizer.mqh
On-chart dashboard · STATUS / BASKET / RISK / MARKET / EVENTS sections · color-coded values + status badges
Config.mqh
System-wide constants · MAX_BASKETS=128 · MAX_LEGS=8 · sleeve names (A_MEANREV / B_TRENDRESCUE / C_CRISIS) · MTRSystemMode + MTRHedgeMode enums
Instrument.mqh
Symbol metadata · digits / point / tick / contract / margin · auto-scales between IC Markets (2-digit XAU) and Exness (3-digit XAUUSDm)
EventLogger.mqh
Structured event log · 9 counters (zone armed / basket birth / add allowed / add blocked / TP ready / forced close / recovery / rescue / partial)
These are MT5 Strategy Tester simulations, not live-account earnings. The datasets use different dates and settings. Grid and basket-recovery strategies can suffer severe losses; positive test results do not establish that the system will be profitable in live use.
IC Markets · XAUUSD M5 · ic_cap5_apr2026.ini · Model=0 (generated ticks) · 1:1000 leverage · 0 ms simulated execution delay. The graph shows a tester simulation, not live trading or a verified real-tick run.
Simulated $10,000 → $363,927.97. The graph export contains 22,324 rows, reduced to 346 display points. One selected month does not establish robustness or future performance.
IC Markets cap=5 · ic_cap5_to_jun2026.ini · Model=0 generated ticks · $10,000 initial deposit · 1:1000 leverage · 0 ms delay. This is one historical data snapshot, without established out-of-sample validation; it is not a result buyers should expect to reproduce or earn.
Recorded in this run’s closed-deal ledger.
Peak-to-trough closed balance. This does not measure all floating-equity risk.
2024-01-01 → 2026-06-10
Rerunning the same data is not cross-validation.
The research notes also report near-total simulated losses when recovery cap 5 was changed to 4 or 6 in adjacent-parameter tests. That sensitivity is a material limitation. A per-cycle hard stop does not cap total account drawdown at 50%.
Source: ic_cap5_to_jun2026_balance.csv; endpoints and realized drawdown checked on September 7, 2026. This raw ledger is not included in the audited buyer ZIP and has no public download here. This check establishes consistency with the stored file, not independent verification of live trading.
January 2024–December 2025, each month reset to $10,000. The template uses Model=0 generated ticks and 1:100 leverage. Results come from sweep_24months_results.csv. This is not a continuously compounded account, and there is no documented train/test procedure establishing walk-forward validation.
A count in this sample, not a future win probability.
Each month uses the same fresh simulated deposit.
2025-10
2024-08
The evidence on this page covers tests using IC Markets and Exness data only. MT5 support does not establish compatibility with every broker. Check hedging-account support, symbol specifications, margin, costs and the broker’s rules. Demo testing also does not establish live-account results.
Read how backtests differ from live results →Historical simulations with different inputs and execution assumptions; these are not live-account results.
Exness · XAUUSDm M5 · $10,000 fresh deposit per run · MT5 Strategy Tester, Model=4 (real-tick mode). Every row is a backtest with a simulated execution delay, not a live-account result.
| Simulated delay | Final balance | Approx. return |
|---|---|---|
| 0 msIdealized zero-delay assumption | $23,902 | +139% |
| 100 ms | $8,233 | -18% |
| 200 ms | $7,423 | -26% |
| 288 ms | $6,207 | -38% |
0 ms is not a claim that a VPS will reproduce this result. The 100–288 ms cases are test conditions, not forecasts for particular internet connections. Lower latency does not establish profitability; market data, spreads, slippage, leverage and broker execution also matter.
Source: the Apr 2026 Exness table in the package’s BACKTEST_RESULTS.md. These conditions differ from the IC Markets runs above. Historical simulations do not establish future results.
Sent to the address you used in checkout. Click the link to confirm — no password to remember, no signup form.
Land on your private download page. The MTR ZIP is signed with SHA-256 you can verify offline. Re-download anytime.
Unzip the source into MetaTrader 5's MQL5 folder, open the project in MetaEditor and compile (one click), then attach the EA to an XAUUSD M5 chart and load the included config. SETUP_GUIDE.md walks every step.
MQL5 source with research tools and documentation to inspect, test and modify for your own conditions.
Powered by Stripe · 7-day refund before download · Non-exclusive license
Trading CFDs carries substantial risk. Past performance does not guarantee future results. Figures shown are modelled MT5 Strategy-Tester backtest results (IC Markets cap=5 reference run, Model=0 generated ticks) that vary with the broker's stored data and are not reproducible; broker spread + latency materially affect real-account outcomes. Not investment advice.
Past performance ≠ future. Backtest is broker-specific.