EA-21499 · Trend Following

One MA EA

This EA trades based on a single Moving Average indicator, opening buy positions when price crosses above the MA and sell positions when price crosses below. It uses the MA as a dynamic trend filter and signal generator, with configurable period, method, and applied price. The EA is a straightforward trend-following system that relies on MA crossovers for entry and typically uses opposite signals or fixed take-profit/stop-loss for exits.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsMA
AuthorYuriy Tokman

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+4.72%+4.09%2.42%13448.10%1.171.955+$3.81Reliable
GBPUSD-1.03%-0.90%4.97%13550.70%-0.14-0.215−$0.59Reliable
USDJPY+5.72%+4.96%3.30%13453.00%0.981.737+$4.27Reliable
XAUUSD+94.61%+73.34%35.14%14152.90%1.162.697+$69.35Reliable

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 86% of 95 · GBPUSD: better than 38% of 95 · USDJPY: better than 98% of 95 · XAUUSD: better than 86% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD77%+2.59% 2026-03-1.27% 2026-09
GBPUSD46%+3.95% 2026-04-2.91% 2026-03
USDJPY54%+2.65% 2026-09-1.64% 2026-01
XAUUSD69%+52.71% 2026-02-12.97% 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 uses a single Moving Average as the core indicator for trend determination, with a straightforward strategy concept—price above the MA is considered an uptrend for buying, and price below the MA is considered a downtrend for selling. Entry conditions are typically based on price-MA crossovers: a buy position is opened when the close price crosses above the MA, and a sell position when it crosses below. Exit conditions may include closing on opposite crossover signals, fixed take-profit and stop-loss levels, or a combination of both. Position sizing is typically handled with fixed lots, lacking dynamic sizing based on volatility or account risk percentage. Money management is relatively basic, likely relying only on stop-loss to control per-trade loss without additional rules such as maximum drawdown limits or position reduction after consecutive losses. The overall strategy logic is clear but simplistic, making it prone to frequent false signals and consecutive losses during choppy or ranging market conditions.

Strengths

  • Simple and clear strategy logic, easy to understand and debug
  • Single indicator reduces the risk of parameter overfitting
  • Effectively captures medium-to-long-term trends in trending markets
  • Clean code structure, suitable as a beginner EA for learning MQL5
  • Multiple configurable parameters for adaptation to different instruments and timeframes

Weaknesses

  • Single MA signal has significant lag, resulting in late entries
  • Frequent false signals during ranging/choppy markets lead to consecutive losses
  • Lacks dynamic position sizing, unable to adjust risk exposure based on market volatility
  • May lack duplicate order prevention and new bar detection, potentially opening multiple orders on the same signal
  • No spread filter or trading session filter, slippage costs may be high

Possible improvements

  • Add a second MA or ADX as trend strength filter to reduce false signals in ranging markets
  • Implement ATR-based dynamic stop-loss, take-profit and position sizing for better risk-adjusted returns
  • Add new bar detection and signal deduplication to prevent duplicate orders on the same signal
  • Add spread filter and trading session restrictions to reduce costs in unfavorable trading conditions
  • Add trailing stop functionality to protect floating profits

Risk assessment

Overall risk: Medium

  • Lack of new bar detection may cause duplicate order opening within the same bar
  • Fixed lot size not dynamically adjusted based on account equity and volatility
  • Single MA strategy prone to consecutive stop-losses in ranging markets
  • Stop-loss may be insufficient or zero, leading to unlimited risk exposure

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management2.0
Robustness2.0
Innovation1.0
Documentation1.0
Overall1.8

Parameters

ParameterDefaultDescription
MA_Period200Moving average period
MA_MethodMODE_SMAMA method (Simple/Exponential/Weighted/Smoothed)
MA_Applied_PricePRICE_CLOSEMA applied price type
LotSize0.1Fixed lot size (used when MMRec disabled)
Stop_Loss0Stop loss in points (0 to disable)
Take_Profit0Take profit in points (0 to disable)
Magic_Number12345EA magic number for distinguishing 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.