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.
Read from EURUSD_Adaptive_Regime_Showcase_EA.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
TrendTimeframe
ENUM_TIMEFRAMES
PERIOD_H1
用哪个高周期判断市场大方向
FastEMAPeriod
int
80
快速 EMA 周期,用来捕捉较快方向变化
SlowEMAPeriod
int
220
?
ADXPeriod
int
14
ADX 周期,用来衡量趋势强度
TrendADXMin
double
18.0
ADX 至少达到这个值,才认定为趋势市场
RangeADXMax
double
16.0
ADX 低于这个值时,更倾向判定为震荡市场
BreakoutBars
int
10
空头突破时回看多少根 K 线高低点
BreakoutBufferATR
double
0.05
突破时额外加的 ATR 缓冲,减少假突破
TrendStopATRMultiplier
double
1.0
趋势单止损 = ATR * 该系数
TrendTakeProfitRR
double
2.1
趋势单止盈按收益风险比设置,例如 2.1R
TrendTrailATRMultiplier
double
0.8
趋势单追踪止损距离 = ATR * 该系数
TrendBreakevenAtRR
double
0.6
盈利达到多少 R 后,把止损推到保本附近
Show all 40 inputs
Name
Type
Default
Description
UsePullbackLongEntry
bool
true
多头是否采用“回踩后恢复”而不是直接追突破
TrendPullbackRSIMin
double
52.0
多头回踩恢复时,RSI 最低要求
TrendPullbackRSIMax
double
70.0
多头回踩恢复时,RSI 最高限制,避?
TrendPullbackBufferATR
double
0.05
回踩中轨时?
UseShortMacroConfirm
bool
true
空头是否需要更高一级宏观方向确认
ShortMacroTimeframe
ENUM_TIMEFRAMES
PERIOD_H2
空头宏观确认所使用的时间周期
BandsPeriod
int
20
布林带周期
BandsDeviation
double
2.0
布林带标准差倍数
RSIPeriod
int
14
RSI 周期
RangeRSILow
double
30.0
震荡做多时的 RSI ?
RangeRSIHigh
double
70.0
震荡做空时的 RSI ?
RangeStopATRMultiplier
double
1.0
震荡单止损 = ATR * 该系数
RangeMinTargetATR
double
0.8
震荡单至少要有的 ATR 目标距离
RangeBreakevenAtRR
double
0.8
震荡单盈利达到多少 R 后开始保本
RangeFollowMacroBias
bool
true
震荡单是否仍然参考宏观方向过滤逆势单
ATRPeriod
int
14
ATR 周期,供止损、止盈和追踪逻辑使用
RiskPercent
double
1.75
每笔交易计划承?
MaxSpreadPoints
int
25
点差大于该值时放弃交易
SessionStartHour
int
8
?
SessionEndHour
int
20
停止新开仓的小时(平台时间)
CooldownBars
int
1
两笔交易之间至少间隔多少根 K 线
MaxTradesPerDay
int
5
每天最多?
OnePositionOnly
bool
true
是否同时只保留一笔自己的持仓
TradeBias
ENUM_TRADE_BIAS
BIAS_AUTO
人工限制当前 EA 只做多、只做空或双向
MagicNumber
ulong
20260323
EA 专属标识,用来区分自己的单子
SlippagePoints
int
20
下单?
ShowSignalMarkers
bool
true
是否在图表上画出买卖信号标记
ShowStatusComment
bool
true
是否在图表左上显示状态面板
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone 111aaa327/mt5-ea-open-source from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
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.
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
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
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
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
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
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