Sar Scaler EA
- Experts
- Version: 1.10
- Updated: 30 July 2026
Overview
SAR Scaler EA trades the Parabolic SAR: price above the SAR dot triggers a sell, price below triggers a buy. Instead of firing on every flip, it filters signals by how far the SAR point sits from the signal candle's high or low, normalized by ATR, then builds and unwinds positions gradually through pyramided entries and staged partial exits.
How it works
- On every new bar, the EA reads the Parabolic SAR value and compares it to price to determine direction.
- It measures the gap between the SAR point and the candle's low (buy signal) or high (sell signal), divided by ATR.
- An entry is only allowed if this gap meets a minimum ATR threshold, filtering out weak/borderline flips.
- If enabled, additional entries pyramid in the same direction as price extends by a minimum ATR distance from the last entry, up to a maximum count.
- If enabled, the position is closed in up to three partial stages as price reaches successive ATR-based profit targets.
- An optional SAR-based trailing stop tightens the stop-loss bar by bar.
- A reversal signal closes all positions in the current direction before considering a new entry.
Inputs
General
- Magic Number: Unique identifier for trades opened by this EA
- Order Comment: Comment tag attached to every trade
- Trading Timeframe: Timeframe used for SAR/ATR signal calculation
- Risk Percent: Percentage of equity risked per entry, sized from SL distance
- Max Spread Points: Maximum allowed spread, in points, to open a new trade
Parabolic SAR
- SAR Step: Acceleration factor step for the Parabolic SAR
- SAR Maximum: Maximum acceleration factor for the Parabolic SAR
Entry Filter
- ATR Period: Period of the ATR used to normalize the SAR-to-price gap
- Entry Min Distance ATR: Minimum SAR-to-candle-extreme distance, in ATR, required to allow an entry
Multi-Entry (Pyramid)
- Use Multi Entry: Enables pyramiding additional entries in the same direction
- Max Entries: Maximum number of simultaneous entries per direction
- Pyramid Min Distance ATR: Minimum price move, in ATR, since the last entry before adding another one
Multi-Exit (Partial Close)
- Use Multi Exit: Enables scaled partial position closing
- TP1 ATR: First partial take-profit level, in ATR
- TP1 Percent Close: Percentage of the position closed at TP1
- TP2 ATR: Second partial take-profit level, in ATR
- TP2 Percent Close: Percentage of the position closed at TP2
- TP3 ATR: Third partial take-profit level, in ATR
- TP3 Percent Close: Percentage of the position closed at TP3
Risk / Exit
- SL ATR Mult: Stop-loss distance, expressed as a multiple of ATR
- Use SAR Trailing: Enables trailing the stop-loss on the Parabolic SAR value
Optimizer Score
- Score Min Profit Factor: Minimum profit factor required to keep a backtest run
- Score Max Drawdown Pct: Maximum drawdown percentage allowed to keep a backtest run
- Score Min Trades: Minimum number of trades required to keep a backtest run
- Score R2 Weight: Weight of the equity curve R² (smoothness) in the score
- Score Slope Weight: Weight of the normalized equity slope (profit speed) in the score
- Score Split Penalty: Penalty for R² divergence between the first and second half of the curve (stability)
- Score Skew Penalty: Penalty for profit concentration in a single trade
- Score Ulcer Penalty: Penalty for the Ulcer Index (depth and duration of drawdowns)
- Score MAR Weight: Weight of the MAR ratio (net profit % / max drawdown %) in the score
- Score Trade Bonus Weight: Weight of the logarithmic trade-count bonus in the score
Optimizer scoring system
SAR Scaler EA includes a built-in custom scoring function (OnTester) designed against curve-fitting. It disqualifies any optimization run with negative profit, a profit factor below the minimum, drawdown above the maximum, or too few trades. Remaining runs are ranked by a weighted mix of equity curve R² (smoothness), normalized slope (profit speed), MAR ratio (capital efficiency) and a diminishing trade-count bonus, minus penalties for split-half R² divergence (temporal stability), single-trade profit skew (concentration risk) and Ulcer Index (drawdown pain). Set Optimizer Criterion to Custom max before running any optimization.
Recommended setup
Backtests were run in OHLC 1 minute modeling on the following symbol/timeframe combinations:
- XAUUSD, H3
- USDJPY, M30
- XAUEUR, H6
- XAUJPY, H8
- USDCAD, H6
Screenshots
Strategy Tester reports for the five combinations above.
Disclaimer
Past performance shown in backtests does not guarantee future results. Test on a demo account before live use. Trading leveraged instruments carries risk of loss.
