Trading botv1.4.022 options

Trend Pullback Bot

Expert Advisor for MetaTrader 5 that follows the trend: it buys pullbacks to the fast EMA in an up trend (sells them in a down trend) and lets the trade run with a trailing stop.

Net return
+174.2%
Profit factor
1.67
Max drawdown
18.1%
Trades
303

Backtest on XAUUSD M15 over 82 months, from $500 at 0.5% risk per trade and a 30% drawdown limit. Past results do not promise future returns.

Recommended MT5 setup

Best: XAUUSD · M30

Captures EMA pullbacks in established daily trends with a 6 ATR chandelier trailing stop.

Primary chart
XAUUSD M30
Secondary pair
USDJPY H1
Suggested risk
0.75%–1.0%
7-year winning months
54W / 25L

Optimized v1.4.0 defaults built into this EA

BiasTimeframeD1
ATR Ratio Band0.7–1.8
MaxEmaDistanceAtr2.5
MaxWeeklyLossPercent1.5%
TrailAtr6.0

XAUUSD M30 · $10k @ 1% (M15 $500@0.5%: +174.2%). Secondary pair verified on USDJPY H1 (+49.1%, PF 1.43, DD 12.8% at $10k @ 1%).

Multi-symbol portfolio slot:USDJPY H1 (Magic 71040061) · XAUUSD M30 (Magic 71040061) · USDJPY H1 (Magic 71040062)
See full v1.4.0 portfolios

What it does

7 capabilities
  • Higher-timeframe bias, and the chart's own EMAs must agree with separation and slope
  • Entry on a clean pullback to the fast EMA that closes back in the trend direction
  • Wide chandelier trailing stop (6 ATR) with cost-adjusted break-even at 1.5R and no premature target cap
  • Trading hours filter in GMT with automatic DST offset refresh, rollover pause, Friday cutoff and MT5 Economic Calendar news blackout
  • Rolling spread-spike guard freezes stop tightening during wide spreads
  • Account-currency OrderCalcProfit risk sizing, margin cap, monthly loss budget and profit lock
  • Pre-flight OrderCheck, freeze-level protection and execution circuit breaker

How it works

The bot takes the direction from the higher-timeframe bias and checks that the chart agrees: the close must be on the trend side of the chart's slow EMA. It then waits for a pullback: a bar that reaches the fast EMA and closes back beyond it in the trend direction. The first stop is a set number of ATRs from the entry and there is no fixed target. On every new bar the stop trails a set number of ATRs behind the best price since the entry, and it is never moved back, so a long trend is held as long as it lasts. The position is sized by the risk you choose. The key-level, confirmation and target inputs of the other FXOpsPro bots have no effect on this bot. The strategy runs in the bot's DLL and works only with an approved FXOpsPro license key.

Parameters & options

Configured directly in MetaTrader 5 Expert Advisor inputs.

22 of 22
ParameterTypeDefaultDescription
TrendFastEma
int20Trend: fast EMA of the chart; a pullback must reach it
TrendSlowEma
int50Trend: slow EMA of the chart; the close must be on the trend side of it
StopAtr
number3.0First stop loss, in ATRs from the entry
TrailAtr
number6.0Trailing stop: this many ATRs behind the best price since the entry, moved at every new bar and never back (6.0 for this bot)
MinLotRiskPercent
number4.0When the account is too small for RiskPercent, trade the smallest lot if it loses at most this % of the balance at the stop (4.0 for this bot)
MinStopSpreads
number20.0Skip a signal when the stop loss is closer to the entry than this many spreads (20 for this bot; 0: off)
MaxMarginPercent
number18.0Account protection: one trade uses at most this % of the free margin; the lot size is reduced to fit (18 for this bot)
MaxWeeklyLossPercent
number1.5Account protection: no new trades for the rest of the calendar week (Sunday 00:00 server time) after losing this % of the week's starting balance (1.5 for this bot; 0: off)
MaxMonthlyLossPercent
number5.0The bot loses at most this % of the month's starting balance in a calendar month: new trades are sized to the loss that is left, then none until the next month (5.0 for this bot; 0: off)
MonthProfitLockPercent
number0.25Month profit lock: after the month's closed result reaches this % of the month's starting balance, new trades are sized to keep MonthProfitKeepPercent of its best closed result (0.25 for this bot; 0: off)
MonthProfitKeepPercent
number50.0Share of the month's best closed result that the month profit lock keeps, in % (50 for this bot; 0: break-even)
DrawdownThrottlePercent
number0.0Multiply RiskPercent by DrawdownThrottleFactor while account equity is this % or more below its peak (0 for this bot: off)
UseSessionFilter
booltrueTrading hours: open trades only from SessionStartGmt to SessionEndGmt (on for this bot)
SessionStartGmt
int6Trading hours: window start, hour in GMT (6 for this bot: London pre-open)
SessionEndGmt
int17Trading hours: window end, hour in GMT (17 for this bot: stops before late NY fade)
BiasTimeframe
textD1Timeframe of the bias (D1 for this bot; current: automatic, one step above the chart)
MinAtrRatio
number0.7Volatility regime filter: skip entries when current ATR is below this multiple of its 100-bar baseline ATR (0.7 for this bot: blocks dead chop; 0: off)
MaxAtrRatio
number1.8Volatility regime filter: skip entries when current ATR exceeds this multiple of its 100-bar baseline ATR (1.8 for this bot: blocks panic spikes; 0: off)
MaxEmaDistanceAtr
number2.5Anti-chase filter: skip a signal when price is already extended more than this many ATRs beyond the fast EMA in the trade direction (2.5 for this bot; 0: off)
PartialClosePercent
number0.0Close this % of the position at the target (0 for this bot: uncapped trailing winners)
BreakEvenRR
number1.5Before the trailing stop passes entry: move the stop to cost-adjusted break-even once the best price is this many times the open risk in profit (1.5 for this bot; 0: off)
UseCandleExit
boolfalseClose on a reversal candle at a key zone while in profit (false for this bot: lets trend winners run with the chandelier trail)

More trading bots

View all trading bots