MACD + Parabolic SAR + 200 EMA Trend‑Swing Trading System | Full MT5 EA Source Code
Contents
1. Strategy Overview
This strategy originates from the YouTube video 70% Win Rate MACD + Parabolic SAR + 200 EMA Trading System. The original author uses 200 EMA and MACD for dual direction filtering, then uses Parabolic SAR reversal confirmation for entry.The advertised 70 % win‑rate claim comes from the creator’s own sample trades, real‑world backtest and live‑market performance will rarely match this advertised figure. Even so, the core multi‑filter workflow offers valuable educational reference for building trend‑swing automated trading logic.
2. Full Trading Rules
Core Indicators
- EMA: Period 200
- Parabolic SAR: Step 0.02, Maximum 0.2
- MACD: 12, 26, 9
Basic Rules
- Timeframe: All timeframes
- Assets: Precious metals, forex, energy, and others
Entry Rules
Long entry
- Price is above EMA 200
- MACD line crosses above the signal line
- Parabolic SAR dot reverses below the bar

Short entry
- Price is below EMA 200
- MACD line crosses below the signal line
- Parabolic SAR dot reverses above the bar

Exit Rules
Long Exit
- SL: The first Parabolic SAR point where reversal occurs
- TP: 1 times the stop‑loss distance
Short Exit
- SL: The first Parabolic SAR point where reversal occurs
- TP: 1 times the stop‑loss distance
Edge & limitations
This setup combines trend filtering, momentum confirmation, and reversal timing. It performs better in clear trending market conditions. In range‑bound market environments, frequent false SAR flip signals may trigger losing trades. Performance will be affected by spread, slippage and broker stop‑level restrictions.
3.EA implementation
Core logic
I designed this EA to check signals only once after each bar close, and it allows only one open position at a time. It reads completed bar data for 200‑EMA, MACD and Parabolic SAR via indicator handle. Entry triggers only when trend filter, momentum confirmation and closed‑bar SAR flip conditions are all satisfied. Stop‑loss uses SAR price level, take‑profit is calculated with configurable risk‑reward multiple.
Below is the long‑entry logic snippet:
1 | // --- Long entry conditions |
Parameter Settings
| Parameter | Default Value | Description |
|---|---|---|
| LotSize | 0.1 | Trading lot size for market orders |
| TpRiskMultiple | 1.0 | Take‑profit multiplier relative to stop‑loss risk distance |
| EmaPeriod | 200 | Period setting for EMA indicator |
| EmaPrice | PRICE_CLOSE | Applied price source for EMA calculation |
| MacdFast | 12 | Fast period of MACD |
| MacdSlow | 26 | Slow period of MACD |
| MacdSignal | 9 | Signal period of MACD |
| SarStep | 0.02 | Acceleration step value for Parabolic SAR |
| SarMaximum | 0.2 | Maximum acceleration value for Parabolic SAR |
| MagicNumber | 12345 | Unique EA magic number for position identification |
EA Source Code / Download
5. Limitations & Disclaimer
No backtest / forward‑test results provided. Users must verify robustness via personal backtest and demo forward‑testing before live usage.
Not financial advice. Forex trading involves substantial risk.