MQL5 Wizard MACD Parabolic SAR
This EA combines MACD and Parabolic SAR indicators to generate trend-following trade signals. It enters long when MACD confirms upward momentum and Parabolic SAR dots are below price, and enters short on the reverse conditions. The strategy is a standard MQL5 Wizard-generated expert advisor with dual indicator confirmation for trend direction.
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 | -9.72% | -8.51% | 11.12% | 144 | 38.50% | -2.06 | -0.87 | 7 | −$7.03 | Reliable |
| GBPUSD | -14.65% | -12.86% | 18.01% | 144 | 41.30% | -2.52 | -0.81 | 13 | −$10.41 | Reliable |
| USDJPY | +0.18% | +0.16% | 6.39% | 144 | 52.40% | 0.06 | 0.03 | 6 | +$0.24 | Reliable |
| XAUUSD | -29.57% | -25.15% | 74.92% | 152 | 55.60% | 0.09 | -0.40 | 9 | −$21.21 | 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 1% of 95 · GBPUSD: better than 0% of 95 · USDJPY: better than 56% of 95 · XAUUSD: better than 30% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 15% | +1.48% 2026-01 | -3.22% 2026-08 |
| GBPUSD | 23% | +1.07% 2026-03 | -5.66% 2026-02 |
| USDJPY | 46% | +2.35% 2026-01 | -2.45% 2026-09 |
| XAUUSD | 62% | +36.19% 2026-09 | -40.80% 2026-07 |
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
This EA employs a dual-indicator confirmation trend-following strategy, using MACD to gauge momentum direction and Parabolic SAR to confirm trend direction, entering trades only when both align. Entry conditions are: go long when MACD main line is above signal line and Parabolic SAR dots are below price; go short on the reverse conditions. Exit conditions rely on signal reversal — closing positions when MACD crossover or SAR flip occurs, with no independent stop-loss or take-profit logic. Position sizing uses a fixed lot size specified by the user parameter, without any dynamic adjustment based on account equity, volatility, or risk percentage. Money management is lacking in risk controls — there is no explicit stop-loss, no trailing stop, no maximum position limit, relying entirely on indicator reversal signals for exit. The overall strategy logic is simple and clear, but the risk exposure is significant; it suits strongly trending markets but tends to generate frequent false signals and consecutive losses in ranging or choppy conditions.
Strengths
- Dual-indicator confirmation reduces false signals; MACD momentum plus SAR trend direction is a logically sound combination
- Wizard-generated code follows MQL5 standard structure with clean modularity, easy to understand and modify
- Strategy logic is simple and intuitive, suitable for beginners learning trend-following trading fundamentals
Weaknesses
- Lacks independent stop-loss mechanism, relying entirely on indicator reversal for exit, which can lead to large losses during volatile moves
- Fixed lot sizing ignores account size and market volatility, resulting in crude money management
- Dual-indicator strategy prone to frequent false signals in ranging markets, leading to consecutive losses
Possible improvements
- Add dynamic stop-loss and trailing stop mechanisms based on ATR or SAR dot levels for protective exits
- Introduce position sizing module that dynamically calculates lot size based on account equity percentage and ATR volatility
Risk assessment
Overall risk: Medium
- No independent stop-loss; extreme market moves could cause severe losses
- Fixed lot sizing does not account for account risk exposure; may be too large or too small relative to equity
- Dual-indicator signals frequently reverse in ranging markets, causing consecutive open/close cycles that increase transaction costs and slippage
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Lots | 0.1 | Fixed trading lot size |
MACD_FastEMA | 12 | MACD fast EMA period |
MACD_SlowEMA | 26 | MACD slow EMA period |
MACD_SignalSMA | 9 | MACD signal SMA period |
SAR_Step | 0.02 | Parabolic SAR acceleration factor step |
SAR_Maximum | 0.2 | Parabolic SAR maximum acceleration factor |
StopLoss | 0 | Initial stop loss distance, 0 for no initial SL |
TakeProfit | 0 | Take profit per order in pips |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.