Trading robot · MT5

SOEA Master

by bfforex

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.

GitHub stars3
Forks1
Last update11 months ago20 Oct 2025
LicenceMIT

Overview

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.

Details

Author

bfforex on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Mean reversion, Indicator crossover, Multi-strategy

Markets

Any symbol

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.

EA files

Input parameters

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

NameTypeDefaultDescription
Inp_WFO_WindowMonthsint36
Inp_WFO_StepMonthsint6
Inp_WFO_StepOffsetint0
Inp_WFO_File_NamestringWFO_Params.csv
Inp_MinStability_Rdouble1.0
Inp_Stability_Tolerancedouble0.20
Inp_FixedRiskPercentdouble1.0Risk per trade (%)
Inp_MaxEquityDrawdowndouble15.0Max drawdown threshold (%)
Inp_SoftGateThresholddouble5.0Soft gate trigger level (%)
Inp_ATR_Periodint20ATR calculation period
Inp_ATR_Multiplierdouble2.5Stop loss ATR multiplier
Inp_MinStopLossPointsdouble100Minimum SL distance (points)
Show all 36 inputs
NameTypeDefaultDescription
Inp_HWM_File_NamestringHWM_Data.txt
Inp_GateStatus_FilestringGateStatus.txt
Inp_FastMAPeriod_Defaultint50Fast MA period
Inp_SlowMAPeriod_Defaultint200Slow MA period
Inp_RSI_Periodint14RSI period
Inp_RSI_Overboughtdouble70.0RSI overbought level
Inp_RSI_Oversolddouble30.0RSI oversold level
Inp_MinBarsBetweenTradesint3Minimum bars between trades
Inp_TakeProfitRatiodouble2.0Risk-to-reward ratio
Inp_UseTrailingStopbooltrueEnable trailing stop
Inp_TrailingStopPercentdouble0.5Trailing stop % of ATR
Inp_UseBreakevenbooltrueMove to breakeven
Inp_BreakevenTriggerATRdouble1.0Breakeven trigger (ATR multiplier)
Inp_UsePartialExitboolfalseEnable partial exits
Inp_PartialExit1_Percentdouble50.0First partial exit %
Inp_PartialExit1_Leveldouble1.0First exit at R multiple
Inp_MaxPositionsint3Max concurrent positions
Inp_CloseAllOnDayEndbooltrueClose at day end
Inp_DayEndHourint22Day end hour (UTC)
Inp_UseExternalDLLboolfalseUse external regime detector
Inp_RegimeDLLNamestringRegimeDetector.dll
Inp_MagicNumberint123456EA magic number
Inp_Slippageint10Max slippage (points)
Inp_DebugLevelint10=Off, 1=Normal, 2=Verbose

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone bfforex/Self-Optimizing-Expert-Advisor-SOEA- 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

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

Forex Master Multi Strategy

by simonokwundue-ops
2 stars

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

MT5 Trading robot Indicator crossoverMean reversionTrend following
Updated 10 months ago None stated GitHub repository of Forex Master Multi Strategy

Golden7

by edisonq
1 stars

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

MT5 Trading robot Trend followingIndicator crossoverMean reversion
Updated 11 months ago None stated GitHub repository of Golden7
1 stars

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

MT5 Trading robot Trend followingMean reversionIndicator crossover
Updated 3 months ago None stated GitHub repository of Multi Filter MA MT5

Edelweiss EA

by Attornado
3 stars

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

MT4 Trading robot Indicator crossoverMean reversionTrend following
Updated 11 months ago MIT GitHub repository of Edelweiss EA

EA31337

by EA31337
1.3k stars

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

MT5 Trading robot Multi-strategyNewsTrend following
Updated 5 months ago GPL-3.0 GitHub repository of EA31337

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