AdaptiveMomentumConfluence
- エキスパート
- バージョン: 2.0
- アップデート済み: 17 8月 2026
Adaptive Momentum Confluence (AMC)
=========================================
FIle SET.- https://c.mql5.com/6/1026/AMC_xauusd_h1.set
Adaptive multi-filter expert advisor with an ONNX AI confidence filter, automatic per-asset parameter profiles (Metal / FX / Index) and a layered exit & protection engine. The XAUUSD H1 neural model is EMBEDDED inside the EX5 — a single self-contained file, no external dependencies.
STRATEGY
--------
- Trend context: higher-timeframe EMA filter (default H4 EMA on H1 charts).
- Four entry modes: Breakout, Pullback, Both, Confluence (default: Pullback).
- Optional confluence filters: momentum burst (xATR velocity), RSI + Stochastic pullback zones, volatility regime (ATR vs ATR-MA band), ADX trend strength, tick-volume confirmation.
- Soft pullback module: candlestick patterns (pin bar / engulfing) + Stochastic divergence.
- AI layer: ONNX binary classifier scores every signal; trades are taken only above the confidence threshold (default P(win) >= 0.48); optional confidence-scaled position sizing.
ONNX / AI DETAILS
-----------------
- Model for XAUUSD H1 is compiled INTO the product (single-file EX5, no downloads, no file management).
- On other symbols/timeframes the EA either loads an external model you specify (InpONNXModel) or gracefully continues without the AI filter — it never blocks trading.
EXIT ENGINE
-----------
- SL / TP = ATR multiples, capped by a max-SL safety multiplier.
- Partial close at 1R with move to breakeven (or breakeven-only mode).
- ATR trailing stop with broker stops/freeze-level guard and minimum-step guard — no modify spam, no "Invalid stops" errors.
- Optional structure trailing (swing low/high) after 2R.
- Smart reverse exit (only if trade is below the R-threshold).
AUTO SYMBOL PROFILE (v2.0)
--------------------------
The EA detects the asset class and applies a ready parameter set:
- Metal (XAUUSD, XAGUSD, ...): risk 6.5%, SL 1.5xATR, trail 0.5xATR
- Index (US30, US500, NAS100, DE40, JP225, ...): risk 2.5%, SL 2.0xATR
- FX: risk 3.0%, SL 2.0xATR
Disable InpAutoSymbolProfile to use your own inputs (Manual mode).
PROTECTION SUITE
----------------
- Equity drawdown stop and soft risk-reduction ramp (risk scales down as DD grows).
- Peak-equity decay protection, loss-streak lot reduction.
- Daily loss cap, max deals per day, post-loss cooldown.
- Max spread filter, market-closed entry gate (no rejected orders at session edges).
- Gap filter, trading session filter (Asia / London / New York), CSV news filter.
INFO PANEL
----------
Dark on-chart panel: symbol profile pill (Metal/FX/Index/Manual), ONNX status [EMB]/[FILE]/[OFF], stops/freeze/buffer state [MOD OK]/[MOD BLK], live risk and stats. Automatic Comment() fallback.
BACKTESTS (Strategy Tester, deposit 3000 USD, leverage 1:500, 2020.01.01 - 2026.08.01, every-tick mode on 1-min OHLC)
--------------------------------------------------------------------------------------------------------------------
Symbol (profile) Net profit Trades PF Equity DD
XAUUSD H1 (Metal, production set) +19 404 807 3539 1.54 7.12%
XAUUSD H1 (Metal, defaults) +10 608 469 9503 1.29 29.18%
XAUUSD H4 (Metal, H4 set) +272 490 2562 1.28 26.18%
US30Cash H1 (Index, defaults) +758 088 9753 1.09 26.51%
GBPUSD H1 (FX, defaults) +119 9447 1.00 73.33%
EURUSD H1 (FX, defaults) -1 879 5992 0.98 80.56%
The EA is tuned for gold. On other symbols the automatic profiles keep trading SAFE and error-free, but profitability on FX pairs with default settings is not claimed. All runs verified with ZERO order/modify errors.
REQUIREMENTS & RECOMMENDATIONS
------------------------------
- Any MT5 broker with XAUUSD; hedging or netting accounts both supported.
- Recommended: XAUUSD H1, VPS, low-spread ECN account.
- Default Metal risk (6.5%) is aggressive by design of the production profile — for live trading start with 1-2% risk or a proportional deposit (>= 500 USD for defaults).
- Works fully in the Strategy Tester, including optimization (parameters are optimization-ready).
RISK WARNING: Past backtest results do not guarantee future performance. Trading leveraged products involves substantial risk of loss.
