Trading robot · MT5

Trend Reversal EA

by fastleopard9372

This MetaTrader 5 expert advisor executes trades based on a combination of momentum and trend indicators, specifically MACD, RSI, CCI, and ADX.

GitHub stars1
Forks0
Last update1 year ago1 Jun 2025
LicenceNone stated

Overview

Trend Reversal EA seeks trend reversal opportunities by identifying overbought or oversold conditions combined with specific trend strength requirements. The EA includes risk management features such as fixed stop loss, take profit, and percentage-based lot sizing. It supports hedging and limits the total number of open positions. Exit logic is flexible, offering signal-based closures or time-based exits after a defined candle period. The repository lacks a README.

Details

Author

fastleopard9372 on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Mean reversion, Indicator crossover, Hedging

Markets

Any symbol

Timeframes

Any timeframe

Risk profile

  • Holds opposite positions at once

Input parameters

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

NameTypeDefaultDescription
LotSizedouble0.1Lot size
MagicNumberint12345Magic number
MaxPositionsint2Maximum positions (1 or 2)
AllowHedgingbooltrueAllow opposite positions
MACD_Fastint5MACD Fast EMA
MACD_Slowint35MACD Slow EMA
MACD_Signalint9MACD Signal SMA
CCI_Periodint14CCI Period
ADX_Periodint14ADX Period
RSI_Periodint10RSI Period
CCI_Oversolddouble-100CCI Oversold level
MACD_MinValuedouble0.0004Minimum |MACD| value
Show all 35 inputs
NameTypeDefaultDescription
RSI_BuyMaxdouble45RSI maximum for buy
RSI_BuyOversolddouble30RSI oversold level
ADX_MinStrengthdouble20Minimum ADX trend strength
CCI_Overboughtdouble100CCI Overbought level
RSI_SellMindouble55RSI minimum for sell
RSI_SellOverboughtdouble70RSI overbought level
EnableSignalExitbooltrueEnable signal-based exit
EnableTimeExitbooltrueEnable time-based exit
MaxCandlesPeriodint200Max candles before forced exit
OnlyProfitableTimeExitbooltrueOnly close profitable positions on time
EnableStopLossbooltrueEnable stop loss
StopLossPipsint5Stop loss in pips
EnableTakeProfitbooltrueEnable take profit
TakeProfitPipsint70Take profit in pips
MaxRiskPercentdouble2.0Maximum risk per trade (%)
ShowIndicatorsbooltrueShow indicator panel
AddIndicatorsToChartbooltrueAdd indicators to chart
ShowTradeSignalsbooltrueShow trade signals on chart
BuySignalColorcolorclrLimeBuy signal color
SellSignalColorcolorclrRedSell signal color
StrictConditionsbooltrueRequire all conditions to be met
LogDetailedInfoboolfalseLog detailed condition checks
Lock2TradingFailboolfalseLock 2th Trading Fail

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone fastleopard9372/MQL5 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, and any .mqh files into the Include folder the code expects.
  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

EA Max Profit

by diditgravatar
1 stars

This MetaTrader 5 expert advisor is designed specifically for trading XAUUSD. It utilizes a combination of the Average Directional Index (ADX) for trend strength, Relative Strength Index (RSI) for momentum, and two Simple Moving Averages for trend direction. The system uses multi-timeframe analysis, specifically checki

MT5 Trading robot Indicator crossoverTrend followingMean reversion
Updated 1 year ago None stated GitHub repository of EA Max Profit

Hosopi3 Tanpoji

by harukihosono
1 stars

Hosopi3 Tanpoji is a single-position trading robot for MetaTrader 4 and MetaTrader 5, specifically developed to avoid martingale and averaging techniques. It triggers entries using various built-in technical indicators such as Moving Averages, RSI, Bollinger Bands, and Stochastics, or through external custom indicator

MT4MT5 Trading robot Indicator crossoverMean reversionMulti-strategy
Updated 10 months ago None stated GitHub repository of Hosopi3 Tanpoji

Blessing Three

by duanwujie
1 stars

This MetaTrader 4 expert advisor is an automated grid trading system that utilizes a variety of indicators including Moving Averages, CCI, Bollinger Bands, and MACD for trade entries. It employs a martingale-style lot multiplier to manage position sizing across sequential grid levels. The software includes risk control

MT4 Trading robot GridMartingaleIndicator crossover High risk
Updated 9 years ago None stated GitHub repository of Blessing Three

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
52 stars

This MetaTrader 5 expert advisor serves as an educational example from a book on MQL5 programming. It implements a versatile trading system that can be configured to use moving average crossovers, Relative Strength Index levels, or both indicators combined for trade entries. The EA manages risk with user-defined stop l

MT5 Trading robot Indicator crossoverMean reversion
Updated 6 years ago None stated GitHub repository of Introduction MQL5 Book EA

Allegro Stormer

by ReneMilare
28 stars

Allegro Stormer is a MetaTrader 5 expert advisor that implements a specific technical setup based on momentum and oscillator indicators. It utilizes a Momentum indicator filtered by a moving average alongside a Stochastic Oscillator to identify entry points. Risk management is centralized around the Average True Range,

MT5 Trading robot Mean reversionIndicator crossover
Updated 6 years ago None stated GitHub repository of Allegro Stormer

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