EA-17464 · Trend Following

5_8 MACross

This EA implements a dual moving average crossover strategy using a 5-period and 8-period moving average. It generates buy signals when the fast MA crosses above the slow MA and sell signals when the fast MA crosses below the slow MA. The strategy is a classic trend-following system that aims to capture directional momentum shifts.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskHigh risk
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM1, M5, M15, H1
IndicatorsSMA, EMA
AuthorCopyright © 2006, MetaQuotes Software Corp.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+7.22%+6.25%3.47%12155.00%1.592.084+$6.08Reliable
GBPUSD+11.09%+9.57%2.51%12554.00%2.044.424+$9.13Reliable
USDJPY-0.32%-0.28%5.14%12450.40%-0.03-0.066−$0.38Reliable
XAUUSD+118.00%+90.39%43.83%13253.40%1.282.695+$91.97Reliable

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 94% of 95 · GBPUSD: better than 99% of 95 · USDJPY: better than 49% of 95 · XAUUSD: better than 91% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD69%+3.04% 2026-06-1.24% 2026-08
GBPUSD85%+2.29% 2026-02-1.02% 2025-11
USDJPY62%+2.75% 2026-09-3.52% 2026-08
XAUUSD77%+50.34% 2026-02-6.27% 2026-05

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 5-period and 8-period moving average crossover as its core strategy concept, classifying it as a short-term trend-following system. Entry conditions trigger a buy when the fast MA (period 5) crosses above the slow MA (period 8), and a sell when the fast MA crosses below the slow MA, following the classic golden cross and death cross logic. Exit conditions rely on reverse crossover signals for position closure, meaning long positions are closed on a death cross and short positions on a golden cross. Position sizing typically uses fixed lots or a simple account-balance-based calculation without dynamic adjustment based on volatility or equity changes. Money management is relatively basic, likely lacking hard stop-loss and take-profit settings, relying entirely on MA crossover signals for both entry and exit, which can produce frequent false signals and consecutive losses during ranging markets.

Strengths

  • Simple and clear strategy logic that is easy to understand and verify
  • The 5/8 MA combination is short-term and responsive, quickly capturing trend changes
  • Pure trend-following system performs well in strong trending markets
  • No complex indicator calculations needed, high execution efficiency
  • Few parameters reduce the risk of overfitting

Weaknesses

  • Generates numerous false signals in ranging markets leading to frequent whipsaw losses
  • Lacks explicit stop-loss and take-profit settings, insufficient risk control
  • The 5/8 period is too short and susceptible to market noise causing false breakouts
  • No new bar check mechanism, potentially opening multiple trades within a single bar
  • Lacks advanced position sizing and money management features
  • Does not account for spread and slippage impact on short-term trades

Possible improvements

  • Add ATR-based dynamic stop-loss and take-profit to adjust exit conditions based on market volatility
  • Add a trend filter (e.g., higher timeframe MA direction) to avoid frequent trading in ranging markets
  • Implement a new bar detection mechanism to prevent duplicate entries within the same bar
  • Add spread filter and trading session restrictions to reduce trading costs
  • Implement risk-based dynamic position sizing instead of fixed lot size

Risk assessment

Overall risk: High risk

  • No new bar check mechanism, potentially opening and closing positions repeatedly within the same bar
  • No hard stop-loss setting, vulnerable to significant losses during extreme market moves
  • Short-term MA crossovers generate frequent false signals in ranging markets causing consecutive losses
  • 5/8 period is very short, high trading frequency leads to significant cumulative spread costs

Evaluation scores

Code quality2.0
Strategy logic2.0
Risk management1.0
Robustness2.0
Innovation1.0
Documentation1.0
Overall1.5

Parameters

ParameterDefaultDescription
FastMA_Period5Fast moving average period
SlowMA_Period8Slow moving average period
MA_MethodMODE_SMAMoving average method (SMA/EMA/SMMA/LWMA)
MA_AppliedPricePRICE_CLOSEMoving average applied price
Lots0.1Trading 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.