EA-20626 · Trend Following

EA Moving Average

This EA is a trend-following expert advisor that trades based on Moving Average crossover signals. It opens buy positions when price crosses above the MA and sell positions when price crosses below the MA, with configurable lot sizing and stop loss/take profit levels. The EA is designed for sustained trend capture on medium to higher timeframes.

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-3.12%-2.72%4.06%10247.50%————Same as other EAs
GBPUSD+4.59%+3.98%4.90%10052.00%————Same as other EAs
USDJPY+2.24%+1.94%3.84%9647.90%————Same as other EAs
XAUUSD+54.46%+43.22%46.98%9556.40%————Same as other EAs

On every market this backtest is identical to EA-21515. The automatic conversion almost certainly lost what makes this EA different (a custom indicator, a filter or the money management), so these results are not ranked or counted.

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.

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 strategy concept is based on Moving Average trend following, using the relative position of price to the MA line to determine trend direction. Entry conditions trigger a buy when price crosses above the Moving Average and a sell when price crosses below it, representing a classic single-MA breakout approach. Exit conditions rely on preset stop loss and take profit levels, and may also close positions when a reverse signal appears. Position sizing uses a fixed lot approach where the user sets the trade volume via parameter, with no dynamic position adjustment mechanism. Money management lacks compounding or risk-percentage calculations, with stop loss and take profit set as fixed point values without dynamic adjustment based on account balance. The overall strategy logic is simple and direct, suitable for clear trending markets, but prone to frequent false signals and consecutive losses in choppy or range-bound conditions.

Strengths

  • Simple and clear strategy logic, easy to understand and optimize parameters
  • Performs well in trending markets, effectively capturing medium to long-term trends
  • Well-structured code, suitable as a learning example for MQ5 programming
  • Supports risk percentage and decrease factor for basic money management

Weaknesses

  • Single MA strategy generates frequent false signals in choppy markets, leading to consecutive losses
  • Lacks a trend filter (such as ADX or multi-timeframe confirmation), prone to overtrading in non-trending markets
  • Fixed point stop loss/take profit does not account for market volatility (ATR), resulting in poor adaptability across different market conditions
  • No slippage or spread filter mechanism, may result in unfavorable fills during low liquidity sessions

Possible improvements

  • Add multi-timeframe confirmation and trend strength filter (e.g., only trade when ADX>25) to reduce false signals in ranging markets
  • Use ATR-based dynamic stop loss and take profit calculation instead of fixed points to improve adaptability across varying volatility environments

Risk assessment

Overall risk: Medium

  • Single MA strategy easily generates consecutive false signals in sideways/ranging markets leading to multiple stop losses
  • Fixed point stop loss is not adjusted for market volatility, potentially too wide in low volatility or too narrow in high volatility
  • Lacks spread and slippage filtering, may result in unfavorable executions during news events or low liquidity sessions

Evaluation scores

Code quality4.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation3.0
Overall2.8

Parameters

ParameterDefaultDescription
Lots0.1Fixed trading lot size
MaximumRisk0.02maximumrisk ratio
DecreaseFactor3Lot decrease factor after loss
MovingPeriod12Moving average period
MovingShift6Moving average shift
StopLoss0Stop loss in points, 0 means no stop loss
TakeProfit0Take profit in points, 0 means no take profit

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.