EA-20403 · Trend Following

Crossing of two iMA v2

This EA trades based on the crossover of two Moving Averages (iMA). It opens a buy position when the fast MA crosses above the slow MA and a sell position when the fast MA crosses below the slow MA, closing opposite positions on signal reversal.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4, D1
IndicatorsMA
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-0.68%-0.60%3.81%11047.70%-0.16-0.184−$0.32Reliable
GBPUSD+6.46%+5.59%3.89%11050.90%1.181.668+$5.87Reliable
USDJPY+1.74%+1.51%5.35%10448.10%0.380.336+$1.67Reliable
XAUUSD+5.76%+4.73%51.23%10550.00%0.420.117+$7.92Reliable

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 Trend Following EAs with a reliable result on the same market: EURUSD: better than 49% of 95 · GBPUSD: better than 91% of 95 · USDJPY: better than 73% of 95 · XAUUSD: better than 57% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD54%+2.69% 2026-04-1.12% 2026-01
GBPUSD62%+2.67% 2026-04-2.56% 2026-10
USDJPY54%+3.04% 2026-04-1.93% 2026-03
XAUUSD62%+28.90% 2026-02-28.86% 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

This strategy is a classic dual moving average crossover trend-following system. Entry conditions: a buy is triggered when the fast moving average crosses above the slow moving average, and a sell is triggered when the fast MA crosses below the slow MA. Exit conditions: when a reversal crossover signal occurs, the EA closes the current position and may open a reverse position. Position sizing uses a fixed lot size approach, with the user setting the trade volume via input parameters. For money management, the EA provides stop loss and take profit parameters for the user to configure, but lacks dynamic position sizing or account-balance-proportional money management. The overall strategy logic is simple and clear, suitable for strongly trending markets, but is prone to frequent false signals and consecutive losses in choppy or ranging markets.

Strengths

  • Simple and clear strategy logic, easy to understand and verify
  • Classic trend-following approach that performs well in strong trending markets
  • Highly configurable parameters allow optimization for different instruments and timeframes

Weaknesses

  • Prone to frequent false signals and consecutive losses in choppy/ranging markets
  • Lacks dynamic position sizing; fixed lot size does not adapt to different account sizes
  • Default stop loss and take profit are 0, risking significant losses if not manually configured
  • No new bar check mechanism, potentially opening multiple positions within the same bar

Possible improvements

  • Add new bar detection logic to prevent repeated trading within the same bar
  • Implement ATR-based dynamic stop loss or trailing stop to improve risk management
  • Add a trend filter (e.g., higher timeframe MA direction confirmation) to reduce false signals in ranging markets

Risk assessment

Overall risk: Medium

  • Default SL/TP of 0 exposes the account to unlimited loss risk if user forgets to set them
  • Lack of new bar check may cause repeated position opening within the same bar
  • Fixed lot size without proportional money management may lead to overleveraging on small accounts

Evaluation scores

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

Parameters

ParameterDefaultDescription
FastMA_Period9Fast moving average period
SlowMA_Period21Slow moving average period
LotSize0.1Fixed trading lot size
StopLoss0Stop loss in points, 0 means no stop loss
TakeProfit0Take profit in points, 0 means no take profit
MA_MethodMODE_SMAMoving average calculation method
MA_Applied_PricePRICE_CLOSEMoving average applied price

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.