Trading robot · MT5

XM AI Scalping Bot

by mt-abdulla-it

XM AI Scalping Bot is an automated trading EA for MetaTrader 5 designed for multi-asset scalping across forex, indices, and cryptocurrency markets.

High risk

GitHub stars2
Forks0
Last update11 days ago13 Nov 2026
LicenceMIT

Overview

XM AI Scalping Bot evaluates market dynamics using Kaufman Efficiency Ratio (ER), Kaufman Adaptive Moving Average (KAMA) crossovers, RSI momentum, and depth-of-market liquidity walls, verified by an embedded ONNX machine learning model. Risk controls include percentage-based risk sizing, hard dollar loss caps per trade, daily profit and loss limits, equity drawdown circuit breakers, news filters, and dynamic ATR trailing stops. It supports multi-symbol trading with global execution controls.

Details

Author

mt-abdulla-it on GitHub

Type

Trading robot

Strategy

Scalping, Indicator crossover, AI / machine learning, Martingale

Markets

Forex, Indices, Crypto

Timeframes

M1-M5

Risk Profile

  • Uses martingale lot scaling: losses can grow fast

Input Parameters

Read from XM_AI_ScalpingBot.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpRiskPercentdouble1.0🛡️ 1.0% Risk per trade
InpMaxAllowedLotdouble0.10🛡️ Global Hard Max Lot (Pro 0.10 Lot Scaling: +$15 to +$25 per Win)
InpUseCompoundingbooltrueAuto-compounding lot sizing enabled?
InpUseKellyCriterionboolfalse⛔ DISABLED - dangerous on micro accounts < $500
InpDailyProfitTargetPercentdouble10.0🎯 Stop trading if NET profit hits +10% ($10 today)
InpDailyProfitTrailingTriggerPercentdouble3.0🛡️ Start locking profit after +3% ($3)
InpDailyProfitTrailingLockPercentdouble1.5🛡️ Lock at least +1.5% ($1.50)
InpDailyLossLimitPercentdouble3.0⛔ Daily Loss Limit 3.0% (Max -$3.00 on $100 balance)
InpMaxDrawdownPercentdouble3.0Maximum Equity Drawdown Shield (3.0%)
InpMaxDollarLossPerTradedouble8.00🛡️ Hard Dollar Loss Shield: Strict $8.00 Max Loss Cap (Zero Big Losses!)
InpMaxOpenTradesint30Max 30 total open trades across all pairs (Quality Portfolio)
InpMaxTradesPerSymbolint2Max 2 open trades per symbol (Reduced exposure)
Show all 40 inputs
NameTypeDefaultDescription
InpMaxSpreadPointsdouble30.0Max spread 30 pts (Quality execution only)
InpLossCooldownMinutesint3⏳ Loss Cooldown: Pause symbol for 3m after hitting Stop Loss (Anti-Revenge)
InpGlobalOrderBufferSecondsint2🛡️ Global Order Lock: Min 2s between trades across charts (prevents race conditions)
InpAutoFilterLowWinSymbolsboolfalseAuto-block disabled: all Top 20 pairs active with safe lot
InpMaxConcurrentYenTradesint3🛡️ Max concurrent JPY trades (Reduced Yen exposure)
InpUseDOM_Filterbooltrue🛡️ Avoid trading into Sell/Buy Walls
InpDOM_WallRatiodouble3.0Ratio to consider as Wall (e.g. 3x volume)
InpAvoidHighImpactNewsbooltrue🛡️ Active News Protection: Pause trading during high-impact news
InpNewsPauseBeforeint5Pause trading 5 mins BEFORE news
InpNewsPauseAfterint5Pause trading 5 mins AFTER news
InpKAMA_Periodint10ER Period for KAMA
InpKAMA_Fastint2Fast Smoothing Constant
InpKAMA_Slowint30Slow Smoothing Constant
InpEmaFastint9Fast EMA
InpEmaSlowint21Slow EMA
InpUseMTFFilterboolfalseFast Scalping: disabled to allow both BUY & SELL M5 swings
InpTrendTimeframeENUM_TIMEFRAMESPERIOD_H1Higher Timeframe — H1 for strong trend (Elder Triple Screen)
InpTrendEMAint50EMA Period for Trend Filter
InpUsePinBarReversalbooltrueTrade Pin Bar Reversals (Counter-Trend)
InpRSI_Periodint14RSI Period
InpRSI_BuyMaxdouble80.0📈 (Relaxed) RSI maximum for BUY (don't chase overbought)
InpRSI_BuyMindouble20.0📈 (Relaxed) RSI minimum for BUY (don't buy at extreme oversold)
InpRSI_SellMaxdouble80.0📉 (Relaxed) RSI maximum for SELL (don't sell at extreme overbought)
InpRSI_SellMindouble20.0📉 (Relaxed) RSI minimum for SELL (don't chase oversold)
InpUseONNX_AIbooltrue🧠 ONNX AI Win-Probability Filter (ACTIVATED!)
InpONNX_MinProbdouble0.60🛡️ High-Confidence Filter: 60%+ Win Probability Required (Eliminates low-edge losses)
InpUseSMC_FVGboolfalse(Turned OFF for Scalping) Only trade inside Fair Value Gaps (FVG)
InpFVG_Lookbackint10FVG Lookback bars

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone mt-abdulla-it/xm-ai-scalping-bot from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar Expert Advisors

EA Scalper XAUUSD

by francomascareloai
266 stars

EA Scalper XAUUSD is an automated trading research project for MetaTrader 5 focused on gold. It employs a multifaceted entry strategy using Smart Money Concepts like order blocks and liquidity sweeps, alongside moving average crossovers and Fibonacci zones. The EA includes a self-learning module designed to adapt to di

MT5 Trading robot SMC / ICT / price actionIndicator crossoverScalping High risk
Updated 5 months ago Custom licence GitHub repository of EA Scalper XAUUSD

AI Enhanced HFT

by Marco210210
24 stars

This MetaTrader 5 expert advisor combines technical indicators with machine learning forecasts to trade the Forex market. It uses a trend-following approach based on Exponential Moving Average crossovers, filtered by the Average Directional Index and volume confirmations. A unique feature is its integration with extern

MT5 Trading robot Trend followingIndicator crossoverAI / machine learning High risk
Updated 1 year ago None stated GitHub repository of AI Enhanced HFT

AutoTrade EA

by liucheng-12-08
3 stars

AutoTrade EA is a scalping robot for MetaTrader 4 and 5 that utilizes a multi-indicator signal scoring system based on Exponential Moving Average crossovers and RSI levels. It employs an aggressive trade management strategy featuring a dynamic grid and a stepped martingale lot scaling system where position sizes increa

MT4MT5 Trading robot ScalpingIndicator crossoverMartingale High risk
Updated 9 months ago None stated GitHub repository of AutoTrade EA
1 stars

This machine learning expert advisor for MetaTrader 5 utilizes ensemble and deep learning models to analyze market patterns. It offers a versatile multi-strategy approach, allowing users to toggle between trend-following, scalping, and grid-hedging behaviors. Risk controls are comprehensive, featuring fixed percentage

MT5 Trading robot AI / machine learningMulti-strategyScalping High risk

Gold Scalper AI Bridge

by almightymoon
1 stars

This MetaTrader 5 expert advisor acts as a bridge between the trading terminal and an external Python-based AI server. It extracts market data and technical indicators—including EMA, RSI, ATR, and ADX across multiple timeframes—to request trade signals via ZeroMQ, TCP, or file-based communication. The EA manages trade

MT5 Trading robot AI / machine learningScalpingIndicator crossover Archived
Updated 6 months ago None stated GitHub repository of Gold Scalper AI Bridge

Gold Sniper Scalper

by Zaibten
1 stars

The Gold Sniper Scalper is an automated trading robot designed for MT5, specifically optimized for scalping gold (XAUUSD). The EA employs technical analysis using indicators like exponential moving averages (EMA), RSI, and ATR for entries, with optional multi-timeframe (MTF) trend confirmation across M5 and M15 charts.

MT5 Trading robot Trend followingScalpingIndicator crossover High risk
Updated 7 weeks ago None stated GitHub repository of Gold Sniper Scalper

More index EAs

Related on ForexR

Need a Broker for MT5?

Compare regulated brokers that support MT5, with spreads, minimum deposits and leverage side by side.

Compare MT5 brokers