Trading robot · MT5

Forex Ema Risk Bot

by Behzod-max

An MT5 Expert Advisor specifically designed for trading gold (XAU/USD) with modular strategy components and strong risk management filters.

GitHub stars1
Forks0
Last update2 days ago25 Sep 2026
LicenceNone stated

Overview

Forex Ema Risk Bot features four mutually exclusive trading modes: Donchian breakout, EMA trend pullback, session breakout, and Bollinger Bands mean reversion. Trades are entered based on multi-timeframe confirmation rules and exit via ATR-based take profit, stop loss, or optional trailing stop. The EA contains advanced risk features such as daily, weekly, and monthly equity protection limits, news blackout windows, spread filters, and automatic position size reduction during drawdown streaks.

Details

Author

Behzod-max on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Breakout, Trend following, Mean reversion

Markets

Gold

Timeframes

M15-H1

Risk Profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Input Parameters

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

NameTypeDefaultDescription
InpGoldSymbolstringXAUUSD
InpStrategyENUM_STRATEGYSTRATEGY_DONCHIAN_BREAKOUT
InpEntryTimeframeENUM_TIMEFRAMESPERIOD_M15
InpTrendEmaPeriodint200
InpTrendSlopeLookbackint5
InpRegimeAdxThresholddouble20.0
InpAbnormalAtrRatiodouble2.5
InpLowLiquidityAtrRatiodouble0.4
InpFastEmaPeriodint20
InpSlowEmaPeriodint50
InpDonchianPeriodint20
InpAtrPeriodint14
Show all 40 inputs
NameTypeDefaultDescription
InpRsiPeriodint14
InpBandsPeriodint20
InpBandsDeviationdouble2.0
InpMeanReversionRsidouble30.0
InpSessionStartHourint8
InpSessionEndHourint12
InpSignalExpiryBarsint8
InpUseTrendConfirmationbooltrue
InpUseBreakoutConfirmationbooltrue
InpUseMomentumConfirmationbooltrue
InpUseVolumeConfirmationboolfalse
InpMinimumConfirmationsint3
InpRiskPercentdouble0.5
InpBreakoutAtrMultiplierdouble1.2
InpStopAtrMultiplierdouble1.5
InpTargetAtrMultiplierdouble3.0
InpUseTrailingStopboolfalse
InpTrailingAtrMultiplierdouble1.0
InpMaxDailyLossPercentdouble2.0
InpMaxWeeklyLossPercentdouble5.0
InpMaxMonthlyLossPercentdouble8.0
InpMaxDrawdownPercentdouble10.0
InpLossStreakThresholdint3
InpLossStreakRiskFactordouble0.5
InpMaxSpreadPointsint100
InpMaxDeviationPointsint10
InpMaxEntrySlippagePointsint20
InpNewsBlackoutMinutesint15

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone Behzod-max/Robot 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

Nolo Trading Bot

by festomanolo
4 stars

This expert advisor for MetaTrader 5 is a multi-strategy system that utilizes market regime detection to switch between trend following, range trading, and breakout modes. It incorporates a wide array of technical indicators, including Moving Averages, RSI, MACD, Ichimoku, and SuperTrend. The bot manages risk through v

MT5 Trading robot Trend followingMean reversionBreakout High risk
Updated 6 months ago MIT GitHub repository of Nolo Trading Bot

EA SMC Engine

by Pauloeduspbr
3 stars

This automated trading robot for MetaTrader 5 implements Smart Money Concepts (SMC) and ICT principles using a hybrid architecture. Trading logic and signal detection are processed within a native C++ DLL, while the MQL5 bridge handles trade execution and data feeding. The system identifies market structure shifts, inc

MT5 Trading robot SMC / ICT / price actionBreakoutTrend following
Updated 5 months ago MIT GitHub repository of EA SMC Engine
2 stars

This MetaTrader 5 expert advisor combines Bollinger Band mean-reversion, squeeze breakouts, and EMA crossover trend following. It filters for ranging markets using a long-period EMA slope to execute reversal trades with candlestick confirmation, specifically identifying Doji patterns at the bands. Risk management inclu

MT5 Trading robot Mean reversionBreakoutIndicator crossover

This MetaTrader 5 expert advisor executes a multi-stage trading strategy focusing on H1 trendline breakouts and RSI divergences. It refines entries on the M5 timeframe using Change of Character and micro Break of Structure signals. The EA includes automated risk management with percentage-based lot sizing and ATR-based

MT5 Trading robot SMC / ICT / price actionBreakoutTrend following
2 stars

This MetaTrader 5 expert advisor focuses on the EURUSD pair using an adaptive market regime approach. It alternates between trend-following and mean-reversion logic based on ADX and EMA indicators. The trend strategy utilizes price breakouts or pullbacks confirmed by RSI, while the range strategy employs Bollinger Band

MT5 Trading robot Trend followingBreakoutMean reversion

Gold FX EA

by ajeet-trader
1 stars

Gold FX EA is a multi-asset trading robot for MetaTrader 5 that functions as a modular framework for various technical strategies. It allows users to toggle specific modules for forex, gold, silver, cryptocurrencies, and commodities. Strategies include trend following with moving averages, Bollinger Band mean reversion

MT5 Trading robot Trend followingBreakoutMean reversion
Updated 9 months ago None stated GitHub repository of Gold FX EA

More trading robots

Need a Broker for MT5?

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

Compare brokers