This MetaTrader 5 robot employs a dual-strategy approach, switching between trend-following moving average crossovers and RSI-based mean-reversion depending on detected market regimes.
SOEA Master features an integrated walk-forward optimization system that loads optimized parameters from external files to adapt to changing volatility. Risk management is robust, featuring ATR-based position sizing, trailing stops, and multi-tier drawdown gating that automatically reduces risk or halts trading. The system includes equity high water mark tracking, breakeven logic, and optional daily exit times to maintain account safety while navigating different market environments.
Read from SOEA_Master.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
Inp_WFO_WindowMonths
int
36
Inp_WFO_StepMonths
int
6
Inp_WFO_StepOffset
int
0
Inp_WFO_File_Name
string
WFO_Params.csv
Inp_MinStability_R
double
1.0
Inp_Stability_Tolerance
double
0.20
Inp_FixedRiskPercent
double
1.0
Risk per trade (%)
Inp_MaxEquityDrawdown
double
15.0
Max drawdown threshold (%)
Inp_SoftGateThreshold
double
5.0
Soft gate trigger level (%)
Inp_ATR_Period
int
20
ATR calculation period
Inp_ATR_Multiplier
double
2.5
Stop loss ATR multiplier
Inp_MinStopLossPoints
double
100
Minimum SL distance (points)
Show all 36 inputs
Name
Type
Default
Description
Inp_HWM_File_Name
string
HWM_Data.txt
Inp_GateStatus_File
string
GateStatus.txt
Inp_FastMAPeriod_Default
int
50
Fast MA period
Inp_SlowMAPeriod_Default
int
200
Slow MA period
Inp_RSI_Period
int
14
RSI period
Inp_RSI_Overbought
double
70.0
RSI overbought level
Inp_RSI_Oversold
double
30.0
RSI oversold level
Inp_MinBarsBetweenTrades
int
3
Minimum bars between trades
Inp_TakeProfitRatio
double
2.0
Risk-to-reward ratio
Inp_UseTrailingStop
bool
true
Enable trailing stop
Inp_TrailingStopPercent
double
0.5
Trailing stop % of ATR
Inp_UseBreakeven
bool
true
Move to breakeven
Inp_BreakevenTriggerATR
double
1.0
Breakeven trigger (ATR multiplier)
Inp_UsePartialExit
bool
false
Enable partial exits
Inp_PartialExit1_Percent
double
50.0
First partial exit %
Inp_PartialExit1_Level
double
1.0
First exit at R multiple
Inp_MaxPositions
int
3
Max concurrent positions
Inp_CloseAllOnDayEnd
bool
true
Close at day end
Inp_DayEndHour
int
22
Day end hour (UTC)
Inp_UseExternalDLL
bool
false
Use external regime detector
Inp_RegimeDLLName
string
RegimeDetector.dll
Inp_MagicNumber
int
123456
EA magic number
Inp_Slippage
int
10
Max slippage (points)
Inp_DebugLevel
int
1
0=Off, 1=Normal, 2=Verbose
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone bfforex/Self-Optimizing-Expert-Advisor-SOEA- 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.
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
This MetaTrader 5 expert advisor utilizes a weighted signal scoring system to execute trades based on four technical indicators: Moving Average crossovers, RSI, Bollinger Bands, and MACD. It incorporates multi-timeframe analysis across M15, M30, and H1 periods to confirm trend direction. Risk management features includ
MT5Trading robotIndicator crossoverMean reversionTrend following
Golden7 is an automated trading system for MetaTrader 5 that utilizes a weighted confluence engine across seven technical indicators, such as Moving Averages, RSI, and Bollinger Bands. It uniquely allows users to input a manual fundamental bias score to influence trade direction. The robot includes a robust filtering s
This MetaTrader 5 expert advisor implements a multi-timeframe trading strategy across M1, M5, and M15 intervals. It utilizes a seven-period Exponential Moving Average system ranging from EMA 30 to EMA 60 to identify market conditions. When EMAs are aligned, it executes trend-following trades; in consolidated markets, i
Edelweiss EA is an educational trading robot for MetaTrader 4 that utilizes a multi-indicator framework to generate buy and sell signals. It combines exponential moving averages, stochastic oscillators, the awesome oscillator, ADX, and Bollinger Bands to identify market entries. Trade management includes dynamic ATR-ba
MT4Trading robotIndicator crossoverMean reversionTrend following
EA31337 is a comprehensive multi-strategy trading robot and framework for MetaTrader platforms. It features dozens of pre-built strategies utilizing technical indicators like ATR, Moving Averages, and SuperTrend. The system manages entries and exits through a unique filtering system that monitors account metrics, volat