EA-19906 · Multi-Timeframe

Diff_TF_MA_EA

This EA trades based on the difference between moving averages from two different timeframes. It compares the MA values from a higher and a lower timeframe to generate buy and sell signals when the differential crosses threshold levels. The strategy aims to capture trend alignment across multiple timeframes for higher-probability entries.

Open the interactive view (equity curve, symbol switch)

Key facts

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

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+1.62%+1.40%2.02%7856.40%0.500.804+$2.07Reliable
GBPUSD+0.18%+0.16%4.22%8447.60%0.060.0414+$0.22Reliable
USDJPY+0.78%+0.68%4.14%8248.80%0.210.195+$0.95Reliable
XAUUSD-10.49%-8.75%57.31%7857.70%0.23-0.183−$13.45Reliable

Profitable on 3 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 Multi-Timeframe EAs with a reliable result on the same market: EURUSD: better than 64% of 11 · GBPUSD: better than 58% of 12 · USDJPY: better than 33% of 12 · XAUUSD: better than 42% of 12

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD54%+2.02% 2026-04-1.04% 2026-03
GBPUSD54%+2.26% 2026-07-2.15% 2026-10
USDJPY38%+2.33% 2026-04-1.96% 2026-03
XAUUSD46%+60.54% 2026-04-35.00% 2026-02

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 core strategy of this EA utilizes the difference between moving averages from two different timeframes to determine market trend direction. Entry conditions are triggered when the differential between the fast-timeframe MA and slow-timeframe MA exceeds a user-defined threshold: a positive and increasing differential generates buy signals while a negative and decreasing differential generates sell signals. Exit conditions rely on reverse signal triggers or stop-loss and take-profit settings. Position sizing allows the user to specify a fixed lot size, but there is no dynamic position sizing or equity-proportional lot calculation mechanism. Money management is relatively basic, primarily relying on stop-loss and take-profit parameters to control per-trade risk. The overall strategy logic is straightforward, and the multi-timeframe alignment approach helps filter false signals, but it lacks consideration for market volatility and trading costs such as spread.

Strengths

  • Multi-timeframe analysis approach is sound, effectively filtering single-timeframe false signals
  • Strategy logic is concise and clear, parameters are intuitive and easy to understand and optimize
  • Using MA differential rather than simple crossover provides a finer measure of trend strength
  • Supports customizable timeframes and MA periods, offering good flexibility

Weaknesses

  • Fixed lot sizing lacks dynamic position management, unable to automatically adjust risk exposure based on account equity
  • Does not account for spread and slippage impact on trading costs, which may erode profits in short-term operations
  • No new bar check mechanism, potentially opening repeated positions on the same bar
  • Lacks adaptability to market volatility (e.g., ATR), thresholds may become ineffective under different market conditions
  • Stop-loss and take-profit use fixed pip values, not considering volatility differences across currency pairs

Possible improvements

  • Add ATR-based dynamic differential threshold and stop-loss/take-profit to adapt to varying market volatility conditions
  • Implement new bar check and position check logic to prevent repeated entries and over-trading
  • Introduce equity-proportional dynamic position sizing for more scientifically grounded money management

Risk assessment

Overall risk: Medium

  • Lack of new bar check may cause repeated position opening on the same bar, leading to overexposure
  • Fixed stop-loss and take-profit do not adapt to different market volatility environments, potentially causing frequent stop-outs or overly distant targets
  • No spread filter means trading costs are uncontrolled on pairs or sessions with wide spreads

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.3

Parameters

ParameterDefaultDescription
Fast_TimeframeM15Fast timeframe
Slow_TimeframeH4Slow timeframe
Fast_MA_Period14Fast MA period
Slow_MA_Period50Slow MA period
MA_MethodMODE_SMAMAcalculation method
Diff_Threshold0.001Difference threshold; minimum spread to trigger trade
Lot_Size0.1Fixed trading lot size
Stop_Loss500Stop loss in points
Take_Profit1000Take profit in points
MA_Applied_PricePRICE_CLOSEMA applied price type

Similar Multi-Timeframe 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.