EA-1814 · Trend Following

MA.mq5

A dual moving average crossover EA that uses a fast 3-period LWMA and a slow 57-period EMA to generate trend-following signals. It enters buy positions when both MAs are rising and price closes above the slow MA, and sell positions when both MAs are falling and price closes below the slow MA, with fixed SL/TP and 5-digit broker adjustment.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskHigh
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsEMA, LWMA
AuthorMetaQuotes Software Corp.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-39.84%-35.70%43.46%2941.40%-1.79-0.924−$137.38Reliable
GBPUSD-1.97%-1.71%20.77%2751.90%0.08-0.104−$7.28Reliable
USDJPY-13.20%-11.57%20.15%2951.70%-0.60-0.662−$45.50Reliable
XAUUSD-100.00%-100.00%100.00%20.00%—-1.002−$5,131.27Account stopped out

Profitable on 0 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 0% of 95 · GBPUSD: better than 31% of 95 · USDJPY: better than 1% of 95 · XAUUSD: better than 0% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD15%+2.03% 2026-09-8.56% 2026-01
GBPUSD46%+22.03% 2026-02-10.78% 2025-12
USDJPY46%+3.55% 2026-09-10.29% 2026-02

From the backtest equity curve, sampled about every two days; only reliable results.

Blow-up risk: High

  • Hit a stop-out in our backtest (equity below 10%) on XAUUSD

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 trend-following strategy, using the directional consistency of a fast 3-period LWMA and a slow 57-period EMA along with price relative position to identify trends. Buy entry requires four conditions: the slow MA rising for 3 consecutive bars, the fast MA rising for 3 consecutive bars, the close price above the previous slow MA value, and the slow MA above the fast MA. Sell entry mirrors this with declining conditions. Exit relies entirely on fixed stop loss and take profit of 100 points each (auto-adjusted by 10x for 5-digit brokers). Position sizing is a fixed 1.0 lot with no dynamic sizing or money management logic. The strategy only executes on new bars to avoid redundant signals, and it restricts to one position at a time per direction.

Strengths

  • New bar detection prevents redundant trade entries within the same bar, reducing overtrading
  • Automatic 5/3-digit broker adjustment ensures correct SL/TP values across different broker types
  • Clear and concise strategy logic with dual MA directional consistency filter reduces false signals
  • Position check mechanism avoids duplicate entries in the same direction

Weaknesses

  • Fixed 1.0 lot with no money management logic poses excessive risk for large accounts and insufficient capital for small ones
  • 1:1 risk-reward ratio is suboptimal for trend following which typically needs wider profit targets
  • ORDER_FILLING_FOK fill mode may cause order rejections during low liquidity periods
  • No spread filter means entries during high-spread periods may be unfavorable
  • Error handling is incomplete - OrderSend checks retcode but lacks handling for partial failure scenarios

Possible improvements

  • Add dynamic position sizing based on account balance and risk percentage instead of fixed lots
  • Add spread filter and trading session filter to avoid unfavorable entries during high-spread or inactive periods
  • Consider variable SL/TP or trailing stop to give trend-following trades more room for profit
  • Improve order filling mode by preferring ORDER_FILLING_IOC with a retry mechanism

Risk assessment

Overall risk: Medium

  • Fixed 1.0 lot without money management leads to uncontrolled risk exposure across different account sizes
  • No spread filter means entry prices can significantly deviate from expectations in high-spread environments
  • Single position check without magic number filtering may conflict with other EAs on the same symbol

Evaluation scores

Code quality2.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation1.0
Documentation1.0
Overall1.8

Parameters

ParameterDefaultDescription
StopLoss100Stop-loss in points
TakeProfit100Take-profit in points
MA_Period57Slow EMA period
MA_Period13Fast LWMA period
EA_Magic12345EA magic number
Lot1.0Fixed trading 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.