EA-17056 · Trend Following

EMA_WMA

This EA implements a dual moving average crossover strategy using an Exponential Moving Average (EMA) and a Weighted Moving Average (WMA). It generates buy signals when the faster EMA crosses above the slower WMA and sell signals when the EMA crosses below the WMA. The system automates trend-following entry and exit based on these crossover events.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsEMA, WMA
AuthorCopyright © 2009, Vladimir Hlystov

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-3.49%-3.04%4.87%12550.00%-0.74-0.724−$2.54Reliable
GBPUSD+7.12%+6.16%4.47%12454.50%1.211.599+$5.99Reliable
USDJPY+4.09%+3.55%6.49%12855.10%0.710.635+$3.10Reliable
XAUUSD+17.07%+13.90%54.73%12851.20%0.560.315+$15.39Reliable

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 20% of 95 · GBPUSD: better than 94% of 95 · USDJPY: better than 88% of 95 · XAUUSD: better than 65% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD31%+0.82% 2025-12-1.57% 2026-01
GBPUSD69%+2.79% 2026-02-2.28% 2026-03
USDJPY46%+2.98% 2026-04-2.30% 2025-11
XAUUSD54%+54.43% 2026-02-25.19% 2026-08

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

The core strategy concept of this EA is to use the crossover of two different types of moving averages—EMA and WMA—to determine trend direction and generate trading signals. Entry conditions are: open a long position when the EMA crosses above the WMA from below (golden cross), and open a short position when the EMA crosses below the WMA from above (death cross), which is a classic dual MA crossover approach. Exit conditions typically rely on the reverse crossover signal to close positions—closing longs when EMA crosses below WMA and closing shorts when EMA crosses above WMA. Position sizing likely uses either a fixed lot size or a simple account-balance-based calculation, but lacks an advanced position scaling or anti-martingale mechanism. Money management relies on the trend-following nature of MA crossovers, but the strategy is vulnerable to frequent false signals and consecutive losses during ranging or choppy market conditions. Overall, the strategy lacks explicit stop-loss and take-profit settings as well as auxiliary filters for ranging markets, making its risk control relatively weak.

Strengths

  • The strategy logic is simple and clear, easy to understand and debug
  • Uses two different types of moving averages (EMA and WMA), combining the advantages of exponential smoothing and weighted smoothing with different response speeds to price changes
  • Effectively captures medium-term trends in trending markets, enabling trend-following trades

Weaknesses

  • MA crossover signals have inherent lag, often entering after the trend has already moved significantly
  • Frequent false crossover signals in ranging markets lead to consecutive stop-losses and commission drain
  • Lacks explicit stop-loss and take-profit settings, relying entirely on reverse crossover for exit carries significant risk
  • No market filter (such as ADX, volatility, etc.) to distinguish between trending and ranging conditions

Possible improvements

  • Add an ADX or volatility filter to pause trading during ranging markets and reduce false signals
  • Add explicit stop-loss/take-profit mechanisms and a trailing stop feature to improve risk management and profit protection

Risk assessment

Overall risk: Medium

  • Lacks explicit stop-loss, may suffer significant losses in extreme market conditions
  • Frequent false signals in ranging markets lead to consecutive losses
  • Position sizing is simplistic, not considering overall account risk exposure

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.3

Parameters

ParameterDefaultDescription
EmaPeriod10EMA period controlling fast moving average sensitivity
WmaPeriod20WMA period controlling slow moving average smoothness
LotSize0.1Fixed lot size per trade
MagicNumber12345EA magic number for order identification

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.