EA-48961 · Trend Following

YY Cross MA

This EA implements a dual moving average crossover strategy, generating buy signals when a fast MA crosses above a slow MA and sell signals when the fast MA crosses below the slow MA. It is a classic trend-following system that aims to capture directional moves by riding the trend after a crossover confirmation. The EA automates entry and exit based on the MA cross signals with configurable parameters for MA periods, methods, and applied prices.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsMA
Authoreurweb@gmail.com copyright 2024

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-4.06%-3.54%5.02%10740.60%-1.03-0.817−$3.51Reliable
GBPUSD+6.24%+5.40%3.00%11053.60%1.212.087+$5.67Reliable
USDJPY+0.34%+0.30%4.44%10548.60%0.090.086+$0.33Reliable
XAUUSD-27.93%-23.71%62.63%10650.50%0.17-0.455−$24.24Reliable

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 15% of 95 · GBPUSD: better than 87% of 95 · USDJPY: better than 57% of 95 · XAUUSD: better than 32% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD38%+1.43% 2026-04-1.84% 2026-01
GBPUSD62%+3.09% 2026-04-2.05% 2026-01
USDJPY38%+3.01% 2026-04-1.91% 2026-03
XAUUSD46%+40.91% 2026-04-30.89% 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 EA employs a dual moving average crossover strategy as its core trading logic, representing a classic trend-following system. Entry conditions are triggered when the fast MA crosses above the slow MA for buy signals, and when the fast MA crosses below the slow MA for sell signals. Exit conditions are typically based on reverse crossover signals that close existing positions and open new ones in the opposite direction, or through configurable stop-loss and take-profit parameters. Position sizing depends on the lot size parameter configuration, potentially supporting either fixed lot sizes or equity-based dynamic sizing. Money management is addressed through stop-loss and take-profit parameters that control the risk-reward ratio for each trade. The overall strategy logic is straightforward and intuitive, but it is prone to generating frequent false signals during ranging or choppy market conditions, leading to consecutive losses. The strategy lacks a market regime filter to distinguish between trending and sideways markets, and does not account for the impact of trading costs and slippage on frequent signal turnover.

Strengths

  • Strategy logic is simple and clear, easy to understand and verify, suitable for beginners learning trend-following fundamentals
  • MA crossover is a time-tested classic strategy that performs well during strong trending markets
  • High configurability allows users to adjust MA periods, methods, and applied prices to adapt to different markets and timeframes

Weaknesses

  • Generates numerous false signals during ranging markets, leading to frequent open/close cycles and consecutive losses
  • Lacks a market regime filter to distinguish between trending and sideways market conditions
  • Default stop-loss and take-profit of 0 poses risk of unlimited single-trade losses without protective stops
  • MA crossover signals are inherently lagging, often triggering entries only after a significant portion of the trend has already played out

Possible improvements

  • Add a market regime filter (such as ADX indicator or volatility filter) to reduce or suspend trading signals during ranging markets
  • Implement a new bar check mechanism to ensure trading only once per bar at opening, preventing duplicate signals within the same bar
  • Add a trailing stop feature to lock in trend profits and avoid excessive give-back of gains

Risk assessment

Overall risk: Medium

  • Default stop-loss of 0 means single-trade risk is uncontrolled if not manually configured
  • MA crossover strategy is prone to frequent false signals in ranging markets, accumulating consecutive small losses
  • Lack of new bar check may cause multiple trade signals within the same bar, increasing transaction costs

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation1.0
Documentation2.0
Overall2.2

Parameters

ParameterDefaultDescription
FastMA_Period10Fast MA period
SlowMA_Period30Slow 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
LotSize0.1Trading lot size
StopLoss0stop losspoints (0meansnostop loss)
TakeProfit0take profitpoints (0meansnotake profit)
MagicNumber12345EA magic number for identifying this EA's orders

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.