Trading robot · MT5

Eurusd Adaptive Regime EA

by 111aaa327

This MetaTrader 5 expert advisor focuses on the EURUSD pair using an adaptive market regime approach.

GitHub stars2
Forks0
Last update4 weeks ago22 Aug 2026
LicenceMIT

Overview

Eurusd Adaptive Regime EA 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 Bands for mean-reversion. Risk management is centralized around ATR-based volatility, featuring automated stop loss, take profit, trailing stops, and break-even adjustments. It calculates lot sizes based on a fixed risk percentage per trade and includes filters for spread and trading sessions. The repository serves as a strategy engineering showcase.

Details

Author

111aaa327 on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Breakout, Mean reversion, Indicator crossover

Markets

Forex

Timeframes

M15-H1, H4 and above

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.

Topics

algorithmic-tradingeurusdexpert-advisorforexmetatrader5mql5risk-management

Input parameters

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

NameTypeDefaultDescription
TrendTimeframeENUM_TIMEFRAMESPERIOD_H1用哪个高周期判断市场大方向
FastEMAPeriodint80快速 EMA 周期,用来捕捉较快方向变化
SlowEMAPeriodint220?
ADXPeriodint14ADX 周期,用来衡量趋势强度
TrendADXMindouble18.0ADX 至少达到这个值,才认定为趋势市场
RangeADXMaxdouble16.0ADX 低于这个值时,更倾向判定为震荡市场
BreakoutBarsint10空头突破时回看多少根 K 线高低点
BreakoutBufferATRdouble0.05突破时额外加的 ATR 缓冲,减少假突破
TrendStopATRMultiplierdouble1.0趋势单止损 = ATR * 该系数
TrendTakeProfitRRdouble2.1趋势单止盈按收益风险比设置,例如 2.1R
TrendTrailATRMultiplierdouble0.8趋势单追踪止损距离 = ATR * 该系数
TrendBreakevenAtRRdouble0.6盈利达到多少 R 后,把止损推到保本附近
Show all 40 inputs
NameTypeDefaultDescription
UsePullbackLongEntrybooltrue多头是否采用“回踩后恢复”而不是直接追突破
TrendPullbackRSIMindouble52.0多头回踩恢复时,RSI 最低要求
TrendPullbackRSIMaxdouble70.0多头回踩恢复时,RSI 最高限制,避?
TrendPullbackBufferATRdouble0.05回踩中轨时?
UseShortMacroConfirmbooltrue空头是否需要更高一级宏观方向确认
ShortMacroTimeframeENUM_TIMEFRAMESPERIOD_H2空头宏观确认所使用的时间周期
BandsPeriodint20布林带周期
BandsDeviationdouble2.0布林带标准差倍数
RSIPeriodint14RSI 周期
RangeRSILowdouble30.0震荡做多时的 RSI ?
RangeRSIHighdouble70.0震荡做空时的 RSI ?
RangeStopATRMultiplierdouble1.0震荡单止损 = ATR * 该系数
RangeMinTargetATRdouble0.8震荡单至少要有的 ATR 目标距离
RangeBreakevenAtRRdouble0.8震荡单盈利达到多少 R 后开始保本
RangeFollowMacroBiasbooltrue震荡单是否仍然参考宏观方向过滤逆势单
ATRPeriodint14ATR 周期,供止损、止盈和追踪逻辑使用
RiskPercentdouble1.75每笔交易计划承?
MaxSpreadPointsint25点差大于该值时放弃交易
SessionStartHourint8?
SessionEndHourint20停止新开仓的小时(平台时间)
CooldownBarsint1两笔交易之间至少间隔多少根 K 线
MaxTradesPerDayint5每天最多?
OnePositionOnlybooltrue是否同时只保留一笔自己的持仓
TradeBiasENUM_TRADE_BIASBIAS_AUTO人工限制当前 EA 只做多、只做空或双向
MagicNumberulong20260323EA 专属标识,用来区分自己的单子
SlippagePointsint20下单?
ShowSignalMarkersbooltrue是否在图表上画出买卖信号标记
ShowStatusCommentbooltrue是否在图表左上显示状态面板

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone 111aaa327/mt5-ea-open-source 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

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

Swing Trading EA

by JonusNattapong
1 stars

This expert advisor for MetaTrader 5 implements a medium-term swing trading strategy using multiple technical indicators. It identifies entries through two primary methods: trend reversals and breakouts from consolidation zones. The reversal logic utilizes Fibonacci retracement levels combined with Stochastic and MACD

MT5 Trading robot Trend followingBreakoutMean reversion
Updated 1 year ago None stated GitHub repository of Swing Trading EA

Trend Matrix EA

by Rhett-Q
1 stars

Trend Matrix EA is a multi-model trend-following robot for MetaTrader 5, specifically optimized for Gold trading. It utilizes a scoring matrix based on several technical indicators including Moving Averages, MACD, ADX, and Bollinger Bands to determine entries. The system employs a conservative pyramiding approach, addi

MT5 Trading robot Trend followingBreakoutIndicator crossover
Updated 4 weeks ago None stated GitHub repository of Trend Matrix EA

Axuusd Gold Advisor

by damozycodes
1 stars

This expert advisor is designed specifically for trading gold on the MetaTrader 4 platform. It employs a hybrid strategy approach, allowing users to toggle between trend following using moving average crossovers, mean reversion via RSI and Stochastic divergence, and breakout patterns. Trade management includes automate

MT4 Trading robot Trend followingMean reversionBreakout High risk
Updated 8 months ago None stated GitHub repository of Axuusd Gold Advisor

EA31337 Libre

by EA31337
252 stars

EA31337 Libre is an open-source, multi-strategy trading robot for MetaTrader 4 and MetaTrader 5. It functions as a simplified implementation of the EA31337 framework, providing a collection of over 35 built-in strategies based on technical indicators. The expert advisor performs independent market analysis across vario

MT5 Trading robot Multi-strategyTrend followingMean reversion
Updated 1 year ago GPL-3.0 GitHub repository of EA31337 Libre

Scalpflip EA

by anthonycdp
25 stars

Scalpflip EA is an automated scalping robot for MetaTrader 5 that utilizes a multi-layered technical analysis approach. It offers three entry modes: trend-following, mean-reversion, and a smart mode that selects the strategy based on current market conditions. The system filters trades using the Relative Strength Index

MT5 Trading robot ScalpingTrend followingMean reversion
Updated 1 year ago None stated GitHub repository of Scalpflip 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