EA-20827 · Trend Following

MACD and SAR

This EA combines MACD and Parabolic SAR indicators to identify trend-following trade opportunities. It enters trades when both indicators confirm the same trend direction, using MACD for momentum confirmation and SAR for trend direction and trailing stops. The dual-indicator approach aims to filter out false signals by requiring confluence from both momentum and trend indicators.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsMACD, Parabolic SAR
AuthorAlksnis Gatis

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+0.24%+0.21%3.98%13047.30%0.070.065+$0.45Reliable
GBPUSD+2.29%+1.99%3.59%12950.00%0.450.644+$1.98Reliable
USDJPY-6.47%-5.65%9.60%12851.60%-1.18-0.675−$5.05Reliable
XAUUSD-39.73%-34.19%75.80%13648.90%0.11-0.526−$27.59Reliable

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 60% of 95 · GBPUSD: better than 63% of 95 · USDJPY: better than 11% of 95 · XAUUSD: better than 27% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD69%+1.05% 2026-07-2.00% 2026-03
GBPUSD46%+2.46% 2026-04-1.36% 2026-01
USDJPY38%+2.44% 2025-12-2.85% 2026-07
XAUUSD38%+98.66% 2026-07-33.82% 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

This EA employs a dual-indicator trend-following strategy combining MACD and Parabolic SAR. Entry conditions require MACD main line crossing its signal line to confirm momentum direction, while Parabolic SAR dots must align with the same trend direction for trade confirmation. Exit conditions likely rely on SAR reversal dots as trailing stops, or MACD reverse crossover as a close signal. Position sizing typically uses fixed lots or account-equity-proportional lot calculation in standard MQ5 EAs. Money management may include fixed stop-loss and take-profit levels depending on parameter configuration. The strategy benefits from dual-indicator confluence filtering false signals, but suffers in ranging markets where SAR frequently reverses generating multiple losing trades, and MACD as a lagging indicator may cause late entries.

Strengths

  • Dual-indicator confluence effectively filters false signals and improves entry quality
  • SAR provides dynamic trailing stop mechanism for better profit protection
  • Clear and intuitive strategy logic with well-understood parameters for optimization
  • Excellent performance in trending markets, capable of capturing large trend swings

Weaknesses

  • MACD lagging nature causes late entries, potentially missing optimal prices at trend start
  • SAR frequently reverses in ranging markets generating numerous false signals and consecutive losses
  • Lacks market regime detection to automatically distinguish trending from ranging conditions
  • Typical implementation lacks advanced money management like dynamic position sizing or risk percentage control

Possible improvements

  • Add market regime filter (e.g., ADX or ATR) to automatically pause trading in ranging conditions
  • Implement dynamic position sizing based on account risk percentage instead of fixed lots
  • Add time filter and spread filter to avoid unfavorable trading sessions and high-cost executions

Risk assessment

Overall risk: Medium

  • Lacks market regime detection which may cause consecutive losses in ranging markets
  • Default SL/TP may be zero, relying on indicator reversal for exit introduces significant slippage risk
  • Improper SAR acceleration factor settings may cause stops that are too tight or too loose

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.3

Parameters

ParameterDefaultDescription
MACD_fast_ema12MACD fast EMA period
MACD_slow_ema26MACD slow EMA period
MACD_signal_period9MACD signal line period
SAR_step0.02SAR acceleration factor step
SAR_maximum0.2SAR maximum acceleration factor
LotSize0.1Initial lot size, martingale base quantity
StopLoss0Stop loss in points, max loss per trade
TakeProfit0Group TP in points, close all at this profit

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.