🔢 Artificial Intelligence Trading Robot MT5 Settings Guide
Artificial Intelligence Trading Robot MT5 is an advanced AI-powered Expert Advisor designed for automated trading across XAUUSD, XAGUSD, Gold, Silver and Forex markets.
The EA combines adaptive machine learning, intelligent trailing stop management, DMI-based trend analysis, dynamic profit protection, and flexible execution controls to optimize trading performance under varying market conditions.
With customizable risk parameters and smart order management, traders can tailor the system to different trading styles while maintaining disciplined risk control.

🔢 Artificial Intelligence Trading Robot MT5 Settings Explained
🔶 Floating Trail SL PM Only (5-Stage Adaptive)
🔹 InpUseTrailStop = true – Enables the adaptive floating trailing stop system.
🔹 InpBE_Atr = 0.8 – Sets the Break-Even trigger using 0.8 × ATR.
🔹 InpTrail_TrigAtr = 1.2 – Activates the trailing stop after price moves 1.2 × ATR in profit.
🔹 InpTrail_DistAtr = 1.0 – Maintains the trailing stop at 1.0 × ATR behind price.
🔹 InpAccel_TrigAtr = 2.0 – Enables accelerated trailing once profit exceeds 2.0 × ATR.
🔹 InpAccel_DistAtr = 0.6 – Uses a tighter trailing distance of 0.6 × ATR during acceleration.
🔹 InpUseDmiTrail = true – Enables DMI-based intelligent trailing management.
🔹 InpDmi_TrigAtr = 2.0 – Activates DMI trailing after 2.0 × ATR profit.
🔹 InpDmi_MinDistAtr = 0.4 – Sets the minimum DMI trailing distance to 0.4 × ATR.
🔹 InpDmi_MaxDistAtr = 1.2 – Sets the maximum DMI trailing distance to 1.2 × ATR.
🔹 InpUseSwingAnchor = true – Uses recent swing highs and lows as trailing stop anchors.
🔹 InpSwingLookback = 8 – Looks back 8 candles to identify swing points.
🔹 InpSwingBuffer = 0.15 – Applies a 0.15 ATR safety buffer around swing levels.
🔹 InpNeverReduceSL = true – Prevents the Stop Loss from moving backward once advanced.
🔶 Profit Level Trailing PM Only (5-Stage Step-Up SL)
🔹 InpUseProfitTrail = true – Enables five-stage profit level trailing.
🔹 InpProfitLevel1 = 1.0 – First profit milestone activates at 1.0.
🔹 InpProfitLevel2 = 5.0 – Second profit milestone activates at 5.0.
🔹 InpProfitLevel3 = 10.0 – Third profit milestone activates at 10.0.
🔹 InpProfitLevel4 = 15.0 – Fourth profit milestone activates at 15.0.
🔹 InpProfitLevel5 = 20.0 – Final profit milestone activates at 20.0.
🔹 InpRetraceBufLarge = 5.0 – Uses a retracement buffer of 5.0 during large moves.
🔹 InpRetraceBufSmall = 0.5 – Uses a retracement buffer of 0.5 during smaller moves.
🔹 InpPeakRetraceTrig = 5.0 – Peak retracement monitoring begins after 5.0 units of profit.
🔹 InpMinPeakToClose = 1.0 – Requires at least 1.0 profit before allowing peak-based closing.
🔶 Dashboard
🔹 InpShowDashboard = true – Displays the trading dashboard on the chart.
🔹 InpBullColor = Lime – Uses Lime color for bullish conditions.
🔹 InpBearColor = Red – Uses Red color for bearish conditions.
🔹 InpNeutralColor = Gold – Uses Gold color for neutral market conditions.
🔶 Expert Sweep
🔹 InpSweepFrom = 5 – Starts parameter sweep from 5.
🔹 InpSweepTo = 40 – Ends parameter sweep at 40.
🔹 InpSweepStep = 5 – Increases sweep values by 5 each step.
🔶 Machine Learning
🔹 InpMemorySize = 500 – Stores 500 historical observations for AI learning.
🔹 InpRewardMetric = Balanced – Uses the Balanced reward model for optimization.
🔹 InpRecencyDecay = 0.985 – Applies a recency decay factor of 0.985 to historical learning.
🔹 InpSoftmaxSharp = 1.5 – Sets Softmax selection sharpness to 1.5.
🔹 InpMfeWeight = 0.25 – Assigns 0.25 weight to Maximum Favorable Excursion.
🔹 InpMaeWeight = 0.5 – Assigns 0.5 weight to Maximum Adverse Excursion.
🔹 InpMinBars = 3 – Requires at least 3 bars before evaluating trades.
🔹 InpWhipsawPenalty = 0.25 – Applies a 0.25 penalty for whipsaw market behavior.
🔶 DMI Settings
🔹 InpAdxSmoothing = 14 – Uses 14-period ADX smoothing for DMI calculations.
🔶 Trade Settings PM (XAUUSD / XAGUSD / GOLD / SILVER)
🔹 InpLotSize = 0.1 – Sets the default precious metals lot size to 0.10 lots.
🔹 InpTpAtr = 3.0 – Sets Take Profit at 3.0 × ATR.
🔹 InpSlAtr = 1.5 – Sets Stop Loss at 1.5 × ATR.
🔹 InpFlipOnSignal = true – Allows reversing positions immediately when an opposite signal appears.
🔹 InpMagicNumber = 202406 – Assigns Magic Number 202406 to the EA.
🔹 InpMaxOpenTrades = 1 – Limits the EA to 1 simultaneous open trade.
🔶 Trade Settings FX (All Non-PM Symbols)
🔹 InpEnableFXMode = true – Enables Forex trading mode.
🔹 InpFXLot = 0.01 – Uses 0.01 lots as the default Forex position size.
🔹 InpFXSLPoints = 1800.0 – Sets Forex Stop Loss to 1800.0 points.
🔹 InpFXTPPoints = 3600.0 – Sets Forex Take Profit to 3600.0 points.
🔶 Order Execution
🔹 InpOrderRetries = 5 – Retries failed orders up to 5 times.
🔹 InpRetryDelayMs = 250 – Waits 250 milliseconds between retry attempts.
🔹 InpCloseConfirmMs = 3000 – Waits 3000 milliseconds to confirm order closing.
🔹 InpDeviationPoints = 30 – Allows a maximum execution deviation of 30 points.
🔶 Spread Control
🔹 InpEnableSpreadFilter = true – Enables spread protection before opening trades.
🔹 InpMaxSpreadPM = 50.0 – Maximum allowed spread for Precious Metals is 50.0 points.
🔹 InpMaxSpreadFX = 30.0 – Maximum allowed spread for Forex pairs is 30.0 points.
🔢 Conclusion
Artificial Intelligence Trading Robot MT5 combines machine learning, adaptive trailing stops, ATR-based trade management, DMI trend confirmation, and intelligent execution controls into a highly flexible automated trading system. With dedicated configurations for both precious metals and Forex markets, comprehensive spread protection, and AI-driven optimization, the EA provides traders with powerful tools to improve consistency while maintaining disciplined risk management.
🔢 FAQs
❓ What markets can Artificial Intelligence Trading Robot MT5 trade?
It supports XAUUSD, XAGUSD, Gold, Silver, and Forex pairs, with dedicated settings for precious metals and non-metal instruments.
❓ How does the machine learning module improve trading?
The AI analyzes historical trade outcomes using memory, reward metrics, Softmax optimization, and recency weighting to continuously refine decision-making.
❓ What is the purpose of the adaptive trailing stop?
The adaptive trailing system adjusts Stop Loss dynamically using ATR, DMI, and swing anchors, helping protect profits while allowing trades room to develop.
❓ Can I trade both Gold and Forex with the same EA?
Yes. The EA includes separate parameter groups for Precious Metals and Forex, allowing optimized settings for each market type.
❓ How does the spread filter protect trades?
The built-in spread filter blocks new positions whenever spreads exceed 50.0 points for Precious Metals or 30.0 points for Forex, helping avoid expensive trade entries during unfavorable market conditions.









