EA-1077 · Trend Following

up3x1

A triple moving average crossover EA that uses three SMA lines (fast, middle, slow) to generate trend-following trade signals. It enters buy when the fast MA crosses above the middle MA while both remain below the slow MA, and sells on the inverse condition. The EA includes lot optimization based on account risk and consecutive losses, plus a trailing stop for open positions.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsSMA
AuthorInteger

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+7.39%+6.39%3.07%1258.30%1.762.412+$66.42Reliable
GBPUSD-3.78%-3.29%7.49%1833.30%-0.64-0.515−$20.98Reliable
USDJPY-1.59%-1.38%2.85%2948.30%-0.90-0.565−$5.47Reliable
XAUUSD-29.90%-25.44%51.42%2941.40%-0.46-0.585−$103.10Reliable

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 95% of 95 · GBPUSD: better than 19% of 95 · USDJPY: better than 36% of 95 · XAUUSD: better than 29% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD77%+2.79% 2026-06-1.74% 2026-01
GBPUSD46%+1.79% 2026-06-1.93% 2026-04
USDJPY31%+0.57% 2026-08-1.16% 2026-03
XAUUSD38%+40.35% 2026-08-25.23% 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 relationship of three Simple Moving Averages (SMA) to determine trend direction, representing a classic multi-MA trend-following system. Entry conditions: a buy signal is generated when the fast MA crosses above the middle MA from the previous bar to the current bar (golden cross), while both the fast and middle MA values remain below the slow MA, ensuring trades align with the broader trend context; sell signals use the inverse dead cross condition with both fast and middle MAs above the slow MA. Exit conditions include fixed take-profit and stop-loss in points, plus a dynamic trailing stop mechanism that only activates when price moves beyond the entry price. Position sizing uses dynamic lot calculation based on account free margin and MaximumRisk when Lots is set to 0, otherwise uses a fixed lot size. Money management incorporates a DecreaseFactor parameter that proportionally reduces lot size after consecutive losing trades, lowering risk exposure during drawdown periods, though there is no position-adding or martingale mechanism.

Strengths

  • Triple MA filter system requiring both fast and middle MAs to be on the same side of the slow MA reduces false signals in ranging markets
  • Built-in consecutive loss lot reduction mechanism automatically decreases risk exposure during drawdown periods, helping control equity decline
  • Trailing stop only activates after price exceeds entry and correctly checks StopsLevel to prevent broker rejection of modification requests

Weaknesses

  • SMA indicators are inherently lagging, and combining three SMAs further delays signal generation, often causing late entries near trend peaks or troughs
  • Supports only single symbol and single position, preventing pyramiding in trending markets, and does not distinguish between long and short position types
  • Lacks volatility filtering (e.g., ATR), so crossover signals still occur in low-volatility ranging markets leading to frequent stop-loss triggers

Possible improvements

  • Replace SMA with EMA or DEMA to reduce lag, or add ATR volatility filtering to pause trading during low-volatility periods
  • Add multi-timeframe confirmation logic, such as only allowing entries when the higher timeframe trend direction aligns, to improve signal quality

Risk assessment

Overall risk: Medium

  • Pos.Select by symbol only cannot correctly handle multiple positions on the same symbol, which may cause trailing stop or opening logic errors
  • The DecreaseFactor reduction mechanism may reduce lots to minimum but continue trading during extreme consecutive losses without auto-stopping
  • No spread filter or slippage protection, causing take-profit and stop-loss to be easily triggered in high-spread environments

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
MaximumRisk0.05Maximum risk percentage for dynamic lot sizing when Lots=0
Lots0.1Fixed trading lot size
DecreaseFactor0Lot decrease factor after consecutive losses; 0 disables
TakeProfit150Take profit in points
StopLoss100Stop loss in points
TrailingStop100Trailing stop in points; 0 disables
FastPeriod24Fast SMA period
FastShift6Fast SMA shift
MiddlePeriod60Middle SMA period
MiddleShift6Middle SMA shift
SlowPeriod120Slow SMA period
SlowShift6Slow SMA 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.