Trend Me Leave Me
This EA identifies trend direction using moving averages and generates entry signals when the trend is confirmed, then manages trades with a trailing stop mechanism. It opens positions in the direction of the prevailing trend and exits when the trend reverses or the trailing stop is hit. The EA is designed to capture medium-to-long-term trend movements while protecting profits with dynamic stop management.
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 | -3.91% | -3.41% | 5.78% | 118 | 47.00% | -0.84 | -0.68 | 4 | −$3.05 | Reliable |
| GBPUSD | -11.44% | -10.01% | 11.89% | 121 | 40.50% | -1.97 | -0.96 | 7 | −$9.45 | Reliable |
| USDJPY | +2.06% | +1.79% | 3.90% | 120 | 47.90% | 0.44 | 0.53 | 5 | +$1.61 | Reliable |
| XAUUSD | +11.91% | +9.74% | 54.97% | 113 | 44.60% | 0.51 | 0.22 | 8 | +$12.85 | Reliable |
Profitable on 2 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 17% of 95 · GBPUSD: better than 4% of 95 · USDJPY: better than 76% of 95 · XAUUSD: better than 62% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 38% | +0.56% 2025-12 | -2.59% 2026-03 |
| GBPUSD | 31% | +1.55% 2026-08 | -3.15% 2025-11 |
| USDJPY | 46% | +2.74% 2026-07 | -2.68% 2025-11 |
| XAUUSD | 38% | +93.48% 2026-02 | -27.10% 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 strategy core is a trend following system based on moving averages, using the crossover of fast and slow MAs or the relationship between price and MAs to determine trend direction. Entry conditions require trend confirmation, with long entries when MAs are in bullish alignment and price is above the MA, and short entries when bearish alignment with price below the MA. Exit conditions include trend reversal signals (MA crossover in opposite direction) or trailing stop activation, where the trailing stop continuously moves upward as profit increases to lock in gains. Position sizing uses either fixed lots or a percentage-based calculation of account balance, without complex pyramiding logic. Money management relies on the trailing stop for single-trade risk control, but there is no explicit maximum drawdown limit or account-level risk management mechanism. The overall strategy logic is clear but relatively basic, lacking consolidation market filtering and multi-timeframe confirmation.
Strengths
- Clear and simple trend following logic that is easy to understand and adjust
- Trailing stop mechanism protects accrued profits and reduces giveback risk
- Mature strategy concept with stable performance in trending markets
- Highly configurable parameters allowing flexible adjustment for different instruments and timeframes
- Fixed stop loss setting prevents excessive single-trade losses
Weaknesses
- Pure trend strategy prone to frequent stop losses in ranging markets, producing consecutive losses
- Lacks multi-timeframe confirmation, may enter on false breakouts
- No trading session filter, may generate poor signals during low liquidity periods
- Position sizing is simplistic without dynamic volatility-based adjustment
- Missing account-level risk controls such as maximum drawdown limits or daily loss caps
Possible improvements
- Add a ranging market filter (e.g., ADX or ATR threshold) to reduce trading frequency during low trend strength
- Incorporate multi-timeframe confirmation logic to improve entry signal reliability
- Dynamically adjust stop loss and trailing stop distances based on ATR to adapt to different market volatility environments
Risk assessment
Overall risk: Medium
- Lacks ranging market filter, prone to consecutive losses in sideways markets
- No account-level maximum drawdown limit, risk exposure can be large during extreme market conditions
- Position sizing does not account for market volatility, risk may exceed expectations during high volatility
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
FastMA_Period | 13 | Fast moving average period |
SlowMA_Period | 55 | Slow moving average period |
TrailingStop | 30 | Trailing stop in points |
Lots | 0.1 | Trading lot size |
StopLoss | 50 | Fixed stop loss in points |
TakeProfit | 100 | Fixed take profit in points |
MA_Method | MODE_SMA | Moving average calculation method |
MA_Applied_Price | PRICE_CLOSE | Moving average applied price |
Timeframe | H1 | Trading timeframe |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.