Parabolic SAR EA
This EA uses the Parabolic SAR indicator to generate trend-following trading signals. It opens buy positions when the SAR dots flip below the price and sell positions when they flip above. The strategy is a classic trend-following system that rides sustained directional moves while using the SAR as both entry and trailing stop mechanism.
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 | +14.34% | +12.35% | 1.98% | 131 | 58.00% | 3.24 | 7.24 | 6 | +$10.94 | Reliable |
| GBPUSD | +1.96% | +1.70% | 4.89% | 134 | 49.30% | 0.35 | 0.40 | 8 | +$1.46 | Reliable |
| USDJPY | +4.35% | +3.77% | 3.25% | 134 | 48.10% | 0.82 | 1.34 | 6 | +$3.16 | Reliable |
| XAUUSD | -49.55% | -43.18% | 76.94% | 141 | 49.30% | 0.08 | -0.64 | 6 | −$33.62 | 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 97% of 95 · GBPUSD: better than 62% of 95 · USDJPY: better than 91% of 95 · XAUUSD: better than 23% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 100% | +2.60% 2026-02 | +0.18% 2026-10 |
| GBPUSD | 54% | +2.87% 2026-02 | -2.90% 2026-03 |
| USDJPY | 54% | +3.69% 2026-01 | -1.53% 2026-08 |
| XAUUSD | 38% | +38.21% 2026-07 | -40.72% 2026-01 |
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 builds a trend-following strategy around the Parabolic SAR indicator, with the core concept of using SAR dot flips as trend reversal signals. Entry conditions are: go long when SAR dots flip from above price to below, and go short when they flip from below to above. Exit conditions also rely on SAR flip signals, closing positions when the SAR reverses against the held direction, effectively using SAR as a trailing stop mechanism. Position sizing typically uses fixed lots or an equity-proportional approach depending on parameter configuration. Money management leverages the SAR's acceleration factor to dynamically adjust stop-loss distance, progressively tightening the stop as the trend advances to protect profits. However, the Parabolic SAR indicator is prone to generating frequent false signals in ranging or choppy markets, leading to consecutive stop-outs, which is the strategy's primary weakness.
Strengths
- Clear and simple strategy logic based on the classic SAR indicator, easy to understand and verify
- Built-in trailing stop functionality via SAR, progressively locking in profits as the trend develops
- Excellent performance in trending markets, capable of capturing large trend moves
Weaknesses
- Generates frequent false signals in ranging markets, leading to consecutive losses
- Lacks additional trend confirmation filters, relying on a single indicator increases misjudgment risk
- SAR acceleration factor parameters heavily impact performance, requiring different optimization per instrument
- Lacks explicit stop-loss and take-profit options, risk control is not flexible enough
Possible improvements
- Add a trend filter (such as ADX or moving average direction) to reduce false signals in ranging markets
- Implement dynamic position sizing based on ATR or account risk percentage to improve money management
Risk assessment
Overall risk: Medium
- Single SAR indicator generates consecutive false signals in ranging markets causing multiple stop-outs
- Lacks additional stop-loss mechanism; SAR calculation anomalies could cause significant losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
SAR_Step | 0.02 | SAR acceleration factor step, controls SAR approach speed |
SAR_Maximum | 0.2 | SAR acceleration factor maximum, limits tracking tightness |
Lots | 0.1 | Fixed lot size per trade |
StopLoss | 0 | Stop loss in points, 0 to disable |
TakeProfit | 0 | Overall take profit target in points |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.