MT45
MT45 is a trend-following Expert Advisor that uses moving average crossover signals filtered by ADX strength to enter trades in the direction of the prevailing trend. It includes optional trailing stop functionality and ATR-based stop loss management for dynamic risk control. The EA operates systematically on multiple timeframes with configurable parameters for MA periods, ADX thresholds, and position sizing.
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 | +4.23% | +3.67% | 3.91% | 137 | 56.20% | 1.05 | 1.08 | 5 | +$3.09 | Reliable |
| GBPUSD | +1.80% | +1.56% | 7.11% | 137 | 47.40% | 0.34 | 0.25 | 7 | +$1.31 | Reliable |
| USDJPY | -5.26% | -4.59% | 6.13% | 138 | 50.00% | -0.96 | -0.86 | 5 | −$3.81 | Reliable |
| XAUUSD | +127.81% | +97.44% | 52.90% | 149 | 55.40% | 1.67 | 2.42 | 4 | +$84.69 | Reliable |
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 83% of 95 · GBPUSD: better than 60% of 95 · USDJPY: better than 14% of 95 · XAUUSD: better than 94% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 69% | +1.46% 2025-12 | -1.08% 2026-03 |
| GBPUSD | 54% | +3.21% 2026-04 | -3.85% 2026-01 |
| USDJPY | 31% | +1.11% 2026-07 | -2.74% 2026-01 |
| XAUUSD | 85% | +31.09% 2026-03 | -4.99% 2026-05 |
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
MT45's core strategy is a trend following system based on moving average crossovers. Entry conditions: a long position is opened when the fast MA crosses above the slow MA and the ADX value exceeds the configured threshold, while a short position is opened when the fast MA crosses below the slow MA with ADX confirming trend strength. Exit conditions: an ATR multiple is used as the stop loss distance, and an optional trailing stop function locks in profits as the trend progresses. Position sizing supports both fixed lot sizes and percentage-based calculations relative to account equity. Money management includes parameters for maximum open positions and per-trade maximum loss limits. The strategy benefits from ADX filtering which effectively avoids false signals during ranging markets, but may experience significant drawdowns when trending phases end abruptly.
Strengths
- ADX filtering effectively reduces false signals in ranging markets, improving signal quality
- ATR-based dynamic stop loss automatically adjusts to market volatility, adapting to different market conditions
- High configurability with multiple parameters allows traders to optimize for different instruments and timeframes
- Clear and simple trend following logic that is easy to understand and maintain
- Trailing stop function helps lock in trend profits and prevents profit givebacks
Weaknesses
- Trend following strategy prone to consecutive losses in ranging/sideways markets
- Lacks trading session filter, may enter positions during low liquidity periods
- No spread filter, opens positions even when spread is wide
- Fixed lot size mode lacks dynamic position sizing capability
- MA crossover signals have inherent lag, entry prices may not be optimal
Possible improvements
- Add trading session filter to avoid trading during low liquidity periods
- Add spread check to pause new entries when spread exceeds a threshold
- Add dynamic position sizing mode based on account risk percentage
Risk assessment
Overall risk: Medium
- Lack of spread filter may cause additional slippage losses during high volatility periods when spreads widen
- MA crossover signal lag after trend ends may trigger large stop losses
- Multiple simultaneous positions may amplify account risk exposure
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
FastMA_Period | 10 | Fast moving average period |
SlowMA_Period | 50 | Slow moving average period |
MA_Method | MODE_SMA | Moving average calculation method |
ADX_Period | 14 | ADX indicator period |
ADX_Threshold | 25 | ADX trend strength threshold |
ATR_Period | 14 | ATR period for dynamic stop loss |
SL_ATR_Multiplier | 2.0 | ATR stop loss multiplier |
UseTrailingStop | true | Enable trailing stop |
Trail_ATR_Multiplier | 1.5 | trailing stopATR multiplier |
LotSize | 0.1 | Fixed lot size (0 = dynamic calculation) |
MaxPositions | 3 | Maximum positions |
MagicNumber | 19102 | EA magic number to identify its own orders |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.