This Expert Advisor for MetaTrader 5 implements a trend-following strategy on the H4 timeframe by identifying pullbacks to the 50-period Exponential Moving Average.
H4 EMA Pullback Next Level utilizes the 200 EMA to define the primary trend and the 21 EMA to confirm momentum recovery after a pullback. The EA enters trades based on price rejection within a specific ATR-defined zone. Risk management features include percentage-based position sizing, ATR-derived stop losses, and take-profit targets tied to historical swing levels. It includes advanced filters for ADX, candle body ratio, and daily drawdown limits.
ATR-based dynamic stop loss and zone detection
Fractal-based take profit with fixed reward-to-risk fallback
Daily drawdown and trade count protection limits
Optional ADX and EMA slope filters for trend strength
Multi-factor candle rejection and momentum reclaim logic
Read from H4_NextLevel_EA.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
RiskPercent
double
0.50
Risk per trade (% of balance)
MaxLot
double
0.10
Hard cap on lot size
MinLot
double
0.10
Minimum lot size to trade
TF
ENUM_TIMEFRAMES
PERIOD_H4
AtrPeriod
int
14
EmaFastPeriod
int
50
EmaSlowPeriod
int
200
EmaMidPeriod
int
21
ZoneAtrMult
double
0.40
Pullback must reach EMA50 ± (ATR × mult)
SlBufferAtr
double
0.20
SL placed beyond pullback extreme by (ATR × mult)
MinSlAtr
double
1.00
Minimum SL distance in ATR units
UseAdxFilter
bool
false
Show all 36 inputs
Name
Type
Default
Description
AdxPeriod
int
14
MinAdx
double
20.0
MaxSpreadPrice
double
0.40
Maximum allowable spread (price units)
MaxTradesPerDay
int
1
Daily trade limit
MaxDailyLossPct
double
3.0
Daily drawdown limit (% of start equity)
TradeStartHour
int
0
Window open (00 = midnight)
TradeEndHour
int
0
Window close (00 = midnight, wrap = always on)
ForceCloseAtEnd
bool
false
Close open position when outside window
SwingLeft
int
2
SwingRight
int
2
LevelLookbackBars
int
300
MinTpAtr
double
1.2
TP must be at least (ATR × mult) from entry
FallbackRR
double
3.0
Fallback TP = risk × RR if no level found
StrictRiskSizing
bool
false
Skip trade if raw lots < MinLot
ValidateStops
bool
true
Enforce broker stops/freeze level
LogTradeFailures
bool
true
Print failed order details
UseBodyRatioFilter
bool
false
MinBodyRatio
double
0.55
Body must be ≥ 55% of candle range
UseBreakOfPreviousCandle
bool
false
BreakBufferAtr
double
0.00
Extra buffer beyond H2/L2 (ATR units)
UseReclaimBuffer
bool
false
ReclaimBufferAtr
double
0.10
Close > EMA21 + (ATR × mult) for longs
UseEmaSlopeFilter
bool
false
EmaSlopeBars
int
4
Compare EMA50[1] vs EMA50[1 + bars]
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone Mohamed-Kathree/H4-EMA-Pullback-Next-Level-Expert-Advisor 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
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
This MetaTrader 5 expert advisor utilizes the Bollinger Bands and Parabolic SAR indicators to execute trades based on market volatility. It functions as an entry-level algorithmic trading template, allowing users to modify strategy logic or optimize parameters using the MT5 Strategy Tester. The bot manages risk through
Heiken Ashi Naive is a trading robot for MetaTrader 4 and 5 that executes trades based on Heiken Ashi candle characteristics, including body length and wick presence. It evaluates candle sequences to enter positions and can be configured to either follow the trend or operate in an inverted mode for mean-reversion. Risk
This MetaTrader 5 expert advisor combines automated Forex trading with a Discord notification system via a Python Flask webhook. It executes a dual-timeframe strategy using EMA crossovers, a 200-period trend filter, RSI, and VWAP on the M5 and M15 charts. The EA manages trades with ATR-based stop loss and take profit l
FG Scalping Pro is an automated trading system for MetaTrader 5 that utilizes a multi-indicator approach to identify entry points. It combines exponential moving average crossovers with RSI momentum and Bollinger Band volatility filters to execute trades. The EA manages risk through dynamic ATR-based stop loss and take