EA-20621 · Trend Following

UniversalMACrossEA

A universal moving average crossover EA that generates trade signals when a fast moving average crosses a slow moving average. It supports multiple MA types (SMA, EMA, SMMA, LWMA) and applies to any symbol and timeframe, with configurable lot sizing, stop loss, and take profit. The EA opens buy positions on bullish crossovers and sell positions on bearish crossovers, optionally closing opposite positions on new signals.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskHigh risk
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, M30, H1, H4, D1
IndicatorsMA(SMA/EMA/SMMA/LWMA)
AuthorCopyright © 2006, firedave

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-2.12%-1.85%4.20%10149.00%-0.51-0.517−$1.78Reliable
GBPUSD+2.54%+2.20%5.08%9948.50%0.500.507+$2.57Reliable
USDJPY+2.49%+2.16%3.84%9447.90%0.570.655+$2.65Reliable
XAUUSD+27.38%+22.13%60.75%9353.30%0.680.457+$32.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 Trend Following EAs with a reliable result on the same market: EURUSD: better than 33% of 95 · GBPUSD: better than 67% of 95 · USDJPY: better than 77% of 95 · XAUUSD: better than 72% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD46%+2.04% 2026-04-1.64% 2026-10
GBPUSD62%+2.38% 2026-04-2.57% 2026-10
USDJPY46%+3.09% 2026-07-1.90% 2026-03
XAUUSD54%+44.68% 2026-04-30.37% 2026-03

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 is the classic dual moving average crossover system, using the golden cross and death cross of a fast and slow moving average as trend determination signals. Entry conditions are: open a buy position when the fast MA crosses above the slow MA (golden cross), and open a sell position when the fast MA crosses below the slow MA (death cross). Exit conditions depend on the configured stop loss and take profit parameters, with an optional feature to close opposite positions on new crossover signals. Position sizing uses a fixed lot size approach without any dynamic adjustment based on account equity or risk percentage. Money management provides only basic stop loss and take profit controls, lacking advanced risk management features such as trailing stops, partial closes, or breakeven functionality. While the EA supports multiple MA algorithm types for added flexibility, it remains fundamentally a simple trend-following system that is prone to generating frequent false signals and consecutive losses during choppy, range-bound market conditions.

Strengths

  • Simple and clear strategy logic that is easy to understand and verify, suitable for beginners learning MA crossover systems
  • Supports multiple MA types and applied price types, offering high flexibility to adapt to different market characteristics
  • Highly universal — can be applied to any symbol and timeframe without code modification
  • Provides the close-on-opposite-signal option, enabling timely exit from current positions on trend reversal

Weaknesses

  • Lacks dynamic position sizing; fixed lots cannot adapt to account risk and market volatility
  • No trailing stop or breakeven functionality, meaning profitable positions may give back all gains during pullbacks
  • Stop loss and take profit default to 0, meaning no SL/TP is set, creating extreme capital risk
  • Generates numerous false crossover signals in ranging/choppy markets, leading to frequent open/close cycles and consecutive losses
  • Lacks a new bar check mechanism, potentially opening multiple positions on the same candle

Possible improvements

  • Add dynamic position sizing based on account equity percentage or ATR volatility for automatic lot calculation
  • Implement trailing stop and breakeven functionality to protect profits and optimize exit strategies
  • Add a ranging market filter (such as ADX or Bollinger Band width) to avoid frequent trading during consolidation phases
  • Add new bar check and position check logic to prevent duplicate entries on the same candle and over-exposure

Risk assessment

Overall risk: High risk

  • Stop loss and take profit default to 0; if users do not manually set them, trades have no risk protection at all
  • No new bar check mechanism may cause repeated signal triggers on the same candle leading to over-trading
  • No check on current position count may cause duplicate same-direction entries leading to excessive exposure
  • Lack of trailing stop mechanism leaves profitable positions unprotected, potentially turning gains into losses

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management1.0
Robustness2.0
Innovation1.0
Documentation2.0
Overall1.8

Parameters

ParameterDefaultDescription
FastMA_Period10Fast MA period
SlowMA_Period50Slow MA period
FastMA_MethodMODE_SMAfastMAmethod (SMA/EMA/SMMA/LWMA)
SlowMA_MethodMODE_SMAslowMAmethod (SMA/EMA/SMMA/LWMA)
FastMA_AppliedPricePRICE_CLOSEfastMAapplied price type
SlowMA_AppliedPricePRICE_CLOSEslowMAapplied price type
Lots0.1Fixed trading lot size
StopLoss0stop losspoints (0meansnostop loss)
TakeProfit0take profitpoints (0meansnotake profit)
CloseOnOppositetrueClose existing position on opposite signal

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.