EA-264 · Trend Following

Expert_2EMA_ITF

This EA uses a dual EMA crossover signal filtered by an ITF (Intraday Time Filter) module, which restricts trading to specific minutes, hours, and days. It combines fast/slow EMA crossover with ATR-based volatility limits and fixed-lot money management, placing pending orders with defined stop-loss, take-profit, and expiration.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsEMA, ATR
AuthorMetaQuotes Software Corp.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-3.54%-3.08%4.93%10646.70%-0.90-0.727−$3.05Reliable
GBPUSD+4.43%+3.83%4.40%10650.00%0.821.018+$4.18Reliable
USDJPY+4.09%+3.54%3.31%9850.00%0.911.246+$4.17Reliable
XAUUSD-7.65%-6.37%52.35%9954.10%0.34-0.156−$5.28Reliable

Profitable on 2 of 4 markets with reliable results.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Against the other Trend Following EAs with a reliable result on the same market: EURUSD: better than 18% of 95 · GBPUSD: better than 80% of 95 · USDJPY: better than 88% of 95 · XAUUSD: better than 43% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD54%+1.40% 2026-04-1.84% 2026-01
GBPUSD69%+2.40% 2026-04-2.61% 2026-10
USDJPY62%+2.28% 2026-04-1.89% 2026-03
XAUUSD62%+23.03% 2026-09-28.26% 2026-08

From the backtest equity curve, sampled about every two days; only reliable results.

Blow-up risk: No blow-up pattern found

None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

The strategy concept is based on a dual EMA crossover trend-following approach with a fast EMA period of 5 and a slow EMA period of 30, going long when the fast EMA crosses above the slow EMA and short on the reverse crossover. Entry conditions are further filtered by an ATR indicator (period 7) with a Limit parameter (1.2) to avoid entering during low-volatility consolidation phases. Exit conditions use fixed stop-loss (5.0) and take-profit (8.0) levels, with pending orders automatically cancelled after an expiration of 4 bars if not filled. Position sizing uses a fixed lot model (0.1 lots) that does not dynamically scale based on account equity or balance. Money management employs the CMoneyFixedLot class with a 10% percent parameter, but the actual lot size remains fixed without any dynamic position scaling mechanism. The ITF (Intraday Time Filter) module allows users to specify good and bad trading minutes, hours, and days of the week, effectively avoiding false signals during low-liquidity or high-volatility sessions. The strategy uses no trailing stop (CTrailingNone), meaning stop-loss levels are not dynamically adjusted once a position is opened.

Strengths

  • The ITF time filter effectively avoids false signals during low-liquidity sessions, improving entry quality
  • ATR volatility filtering prevents frequent entries during ranging markets, reducing ineffective trades
  • Uses MetaQuotes standard library architecture with clear code structure and high modularity
  • Pending order expiration mechanism prevents unfilled orders from occupying margin indefinitely

Weaknesses

  • Fixed lot sizing does not dynamically adjust based on account size, resulting in low capital utilization
  • No trailing stop means profitable positions cannot lock in floating gains, risking profit givebacks
  • The 5/30 EMA combination is prone to frequent false crossover signals in ranging markets
  • Stop-loss and take-profit use fixed point values instead of ATR multiples, ignoring volatility changes

Possible improvements

  • Change stop-loss and take-profit to ATR-multiple calculations for volatility-adaptive risk parameters
  • Add a trailing stop module to replace CTrailingNone for profit protection
  • Replace fixed lot sizing with dynamic position management based on ATR and account risk

Risk assessment

Overall risk: Medium

  • No trailing stop means profitable positions may give back all gains on reversal
  • Fixed-point stop-loss does not account for reasonableness across different instruments and volatility environments
  • Large gap between fast and slow EMA periods may delay trend entries, leaving insufficient stop-loss room

Evaluation scores

Code quality4.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.7

Parameters

ParameterDefaultDescription
Inp_Signal_TwoEMAwithITF_PeriodFastEMA5Fast EMA period
Inp_Signal_TwoEMAwithITF_PeriodSlowEMA30Slow EMA period
Inp_Signal_TwoEMAwithITF_PeriodATR7ATR indicator period
Inp_Signal_TwoEMAwithITF_Limit1.2ATR volatility limit threshold
Inp_Signal_TwoEMAwithITF_StopLoss5.0Stop loss in points
Inp_Signal_TwoEMAwithITF_TakeProfit8.0Take profit in points
Inp_Signal_TwoEMAwithITF_Expiration4Pending order expiration in bars
Inp_Signal_TwoEMAwithITF_GoodMinuteOfHour-1Allowed trading minutes within hour (-1 for all)
Inp_Signal_TwoEMAwithITF_BadMinutesOfHour0Excluded trading minutes bitmask within hour
Inp_Signal_TwoEMAwithITF_GoodHourOfDay-1Allowed trading hours (-1 for all)
Inp_Signal_TwoEMAwithITF_BadHoursOfDay0Excluded trading hours bitmask
Inp_Signal_TwoEMAwithITF_GoodDayOfWeek-1Allowed trading days of week (-1 for all)
Inp_Signal_TwoEMAwithITF_BadDaysOfWeek0Excluded trading days bitmask
Inp_Money_FixLot_Percent10.0Risk percentage for fixed lot money management
Inp_Money_FixLot_Lots0.1Fixed trading lot size

Similar Trend Following EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.