EA-1921 · Trend Following

Moving Averages

This EA trades based on a simple moving average (SMA) crossover signal. It opens a buy position when the bar opens below and closes above the MA, and opens a sell when the bar opens above and closes below the MA. Position sizing is dynamically calculated based on account free margin and a maximum risk percentage, with lot reduction after consecutive losses.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsSMA
AuthorCopyright 2009-2013, MetaQuotes Software Corp.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+5.90%+5.11%2.69%12551.20%————Same as other EAs
GBPUSD+4.10%+3.55%3.85%12949.20%————Same as other EAs
USDJPY+1.42%+1.23%6.53%12646.40%————Same as other EAs
XAUUSD+180.74%+134.64%36.71%12656.30%————Same as other EAs

On every market this backtest is identical to EA-914. 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

  • Has no stop loss or trailing stop

On its own this is not a typical blow-up pattern, 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 the crossover relationship between price and a Simple Moving Average (SMA) to determine trend direction and follow the trend. Entry conditions are: a buy signal is generated when a bar opens below the MA and closes above it, and a sell signal is generated when a bar opens above the MA and closes below it — effectively a single-bar MA breakout entry. Exit conditions use symmetric logic: a long position is closed when a sell signal appears, and a short position is closed when a buy signal appears, making this essentially a reversal strategy where closing and opening are coupled. Position sizing uses a percentage-risk model based on account free margin with the MaximumRisk parameter, and the DecreaseFactor reduces lot size after consecutive losses to control drawdown. Money management normalizes lot size to the broker's volume step and enforces min/max volume limits, but the strategy has no explicit stop-loss or take-profit, relying entirely on reverse signals for exits, which poses significant risk.

Strengths

  • Position sizing includes a consecutive-loss reduction mechanism that helps control drawdown
  • Lot size is dynamically calculated as a percentage of free margin, scaling risk with account size
  • Trades only on the first tick of a new bar, preventing duplicate signals and overtrading
  • Clean and concise code structure that is easy to understand and modify

Weaknesses

  • No stop-loss or take-profit is set, relying entirely on reverse signals for exits, which can lead to catastrophic losses in extreme markets
  • The single-bar MA crossover signal is overly simplistic and prone to frequent false breakouts and whipsaws
  • The DecreaseFactor reduction only activates when losses>1 and uses linear division rather than exponential reduction, limiting its effectiveness
  • No spread or slippage filter, potentially entering losing trades when spreads are wide or volatility is low
  • OnDeinit does not release the indicator handle (IndicatorRelease), causing a resource leak

Possible improvements

  • Add explicit stop-loss and take-profit levels, at minimum a stop-loss to protect against extreme losses
  • Add spread filtering and multi-timeframe confirmation to reduce false signals and avoid entry under unfavorable conditions
  • Call IndicatorRelease in OnDeinit to properly release the indicator handle and prevent resource leaks
  • Consider adding a trailing stop to lock in profits rather than relying entirely on reverse signal exits

Risk assessment

Overall risk: Medium

  • No stop-loss protection, potentially suffering far greater-than-expected losses during violent reversals or gap events
  • Single-bar crossover signals generate numerous losing trades in choppy/ranging markets
  • Position reduction is linear rather than exponential, providing insufficient protection during consecutive loss streaks

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management2.0
Robustness2.0
Innovation1.0
Documentation2.0
Overall2.0

Parameters

ParameterDefaultDescription
MaximumRisk0.02Maximum risk percentage for lot size calculation
DecreaseFactor3Decrease factor divisor for lot reduction after consecutive losses
MovingPeriod12Moving average calculation period
MovingShift6Moving average shift

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.