Xauusd Trend Pullback identifies the primary trend using a 200-period EMA on the H1 chart and looks for entries on the M15 timeframe when price retracts to a fast EMA and RSI indicates a momentum reset. Risk is managed through ATR-based stop losses, fixed reward-to-risk targets, and equity-based lot sizing. The expert advisor includes optional management tools such as ATR trailing stops, breakeven adjustments, and partial profit taking, while restricting new orders to specific trading sessions.
Multi-timeframe trend filtering with 200 EMA
ATR-based dynamic stop loss and profit targets
RSI and fast EMA pullback entry triggers
Session-limited execution for London and New York
Optional breakeven and ATR trailing stop management
Read from XauusdTrendPullback.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpSignalTF
ENUM_TIMEFRAMES
PERIOD_M15
Signal timeframe
InpTrendTF
ENUM_TIMEFRAMES
PERIOD_H1
Trend-filter timeframe
InpMagic
long
20260826
Magic number
InpComment
string
XAU-TP
Order comment
InpSlippagePoints
ulong
30
Max deviation (points)
InpTrendMaPeriod
int
200
Trend EMA period
InpTrendSlopeBars
int
5
Slope lookback bars (0 = off)
InpDirection
ENUM_TRADE_DIRECTION
DIR_BOTH
Allowed direction
InpFastMaPeriod
int
21
Fast EMA period
InpSlowMaPeriod
int
50
Slow EMA period
InpRsiPeriod
int
14
RSI period
InpRsiPullbackLong
double
45.0
RSI pullback level (long)
Show all 40 inputs
Name
Type
Default
Description
InpRsiTriggerLong
double
50.0
RSI trigger level (long)
InpRsiPullbackShort
double
55.0
RSI pullback level (short)
InpRsiTriggerShort
double
50.0
RSI trigger level (short)
InpPullbackLookback
int
5
Pullback lookback (bars)
InpMaxEntryDistAtr
double
1.5
Max entry distance from fast EMA (ATR, 0 = off)
InpRiskPercent
double
1.0
Risk per trade (% of equity)
InpAtrPeriod
int
14
ATR period
InpAtrSlMultiplier
double
1.5
Stop loss (x ATR)
InpRewardRatio
double
2.0
Take profit (x stop distance)
InpMaxPositions
int
1
Max concurrent positions
InpAllowMinLot
bool
false
Trade min lot if risk lot is smaller
InpUseSession1
bool
true
Enable session 1 (London)
InpSession1StartHour
int
7
Session 1 start hour
InpSession1StartMin
int
0
Session 1 start minute
InpSession1EndHour
int
16
Session 1 end hour
InpSession1EndMin
int
0
Session 1 end minute
InpUseSession2
bool
true
Enable session 2 (New York)
InpSession2StartHour
int
13
Session 2 start hour
InpSession2StartMin
int
0
Session 2 start minute
InpSession2EndHour
int
20
Session 2 end hour
InpSession2EndMin
int
0
Session 2 end minute
InpCloseAtSessionEnd
bool
false
Close open trades when sessions end
InpUseBreakeven
bool
false
Move stop to breakeven
InpBreakevenTriggerR
double
1.0
Breakeven trigger (R)
InpBreakevenOffsetR
double
0.1
Profit locked at breakeven (R)
InpUseTrailing
bool
false
Use ATR trailing stop
InpTrailStartR
double
1.0
Start trailing at (R)
InpTrailAtrMult
double
2.0
Trailing distance (x ATR)
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone srpo93/XAUUSD-bot 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