EA-1076 · Trend Following

Universal Investor

This EA uses a dual moving average crossover system combining EMA and LWMA of the same period to generate trend-following signals. It opens buy positions when LWMA is above EMA and both are rising, and sell positions when LWMA is below EMA and both are falling. Position sizing includes an optional loss-based lot reduction mechanism to scale down after consecutive losing trades.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsEMA, LWMA
AuthorInteger

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-0.80%-0.69%7.30%9444.70%-0.16-0.115−$1.22Reliable
GBPUSD-4.17%-3.64%9.29%9741.20%-0.59-0.455−$4.59Reliable
USDJPY-1.82%-1.58%6.75%9439.40%-0.28-0.278−$1.79Reliable
XAUUSD+13.06%+10.67%71.07%8644.20%0.720.189+$18.89Reliable

Profitable on 1 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 48% of 95 · GBPUSD: better than 18% of 95 · USDJPY: better than 34% of 95 · XAUUSD: better than 64% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD54%+2.17% 2026-01-2.99% 2026-03
GBPUSD31%+3.11% 2026-09-2.84% 2026-02
USDJPY54%+1.90% 2026-09-1.99% 2026-05
XAUUSD62%+61.05% 2026-03-31.74% 2026-02

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

Strategy analysis

The strategy concept is based on the crossover of LWMA and EMA of the same period to determine trend direction; LWMA assigns higher weight to recent prices, making it more responsive than EMA, and their crossover serves as a trend reversal signal. Entry conditions: going long requires LWMA above EMA (short-term momentum upward) and both LWMA and EMA above their previous values (trend confirmation), while going short is the mirror condition. Exit conditions: long positions are closed when LWMA falls below EMA, and short positions are closed when LWMA rises above EMA, representing a reversal-based exit rather than fixed stop-loss or take-profit levels. Position sizing offers two modes: fixed lots or dynamic lots calculated from free margin multiplied by the risk percentage. The DecreaseFactor mechanism in money management progressively reduces lot size after consecutive losing trades—the more losses, the greater the reduction—which helps control drawdown, but the strategy lacks explicit stop-loss protection, relying entirely on indicator signals for exits.

Strengths

  • Dual MA confirmation (crossover + same-direction movement) reduces false signals compared to simple MA crossover
  • DecreaseFactor loss-reduction mechanism helps control risk exposure during consecutive losing streaks
  • Clean code structure with well-separated modules for signal logic, position sizing, and trade execution
  • New bar check mechanism (LastTime) prevents duplicate entries within the same bar

Weaknesses

  • No stop-loss or take-profit set—exits rely entirely on indicator reversal signals, which can lead to excessive single-trade losses
  • Lot calculation formula (free margin × risk / 1000) lacks theoretical justification and does not account for ATR or pip value
  • DecreaseFactor reduction logic when losses barely exceed 1 may result in excessively small position sizes
  • The mutual exclusion logic between buy and sell signals may fail to handle conflicting signals correctly

Possible improvements

  • Add stop-loss and take-profit parameters, at minimum an ATR-based stop-loss to cap maximum per-trade loss
  • Improve the lot calculation formula to use a proper risk-based approach accounting for ATR or pip value instead of the arbitrary division by 1000
  • Add trading session filters to avoid generating false signals during low-liquidity periods

Risk assessment

Overall risk: Medium

  • No stop-loss configured—delayed reversal signals in strong trends can cause significant losses
  • Position sizing does not consider volatility—high-volatility instruments may result in oversized positions
  • Closing with 3x spread deviation may still fail to execute in extreme market conditions

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
MovingPeriod23MA smoothing period, applied to both EMA and LWMA
MaximumRisk0.05Maximum risk percentage for dynamic lot sizing when Lots=0
Lots0.1Fixed lot size; set to 0 for dynamic sizing
DecreaseFactor0Lot decrease factor after consecutive losses; 0 disables

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.