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
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | +7.39% | +6.39% | 3.07% | 12 | 58.30% | 1.76 | 2.41 | 2 | +$66.42 | Reliable |
| GBPUSD | -3.78% | -3.29% | 7.49% | 18 | 33.30% | -0.64 | -0.51 | 5 | −$20.98 | Reliable |
| USDJPY | -1.59% | -1.38% | 2.85% | 29 | 48.30% | -0.90 | -0.56 | 5 | −$5.47 | Reliable |
| XAUUSD | -29.90% | -25.44% | 51.42% | 29 | 41.40% | -0.46 | -0.58 | 5 | −$103.10 | Reliable |
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
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 77% | +2.79% 2026-06 | -1.74% 2026-01 |
| GBPUSD | 46% | +1.79% 2026-06 | -1.93% 2026-04 |
| USDJPY | 31% | +0.57% 2026-08 | -1.16% 2026-03 |
| XAUUSD | 38% | +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
Parameters
| Parameter | Default | Description |
|---|---|---|
MaximumRisk | 0.05 | Maximum risk percentage for dynamic lot sizing when Lots=0 |
Lots | 0.1 | Fixed trading lot size |
DecreaseFactor | 0 | Lot decrease factor after consecutive losses; 0 disables |
TakeProfit | 150 | Take profit in points |
StopLoss | 100 | Stop loss in points |
TrailingStop | 100 | Trailing stop in points; 0 disables |
FastPeriod | 24 | Fast SMA period |
FastShift | 6 | Fast SMA shift |
MiddlePeriod | 60 | Middle SMA period |
MiddleShift | 6 | Middle SMA shift |
SlowPeriod | 120 | Slow SMA period |
SlowShift | 6 | Slow SMA shift |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.