Buys 1 contract when the close moves above the Parabolic SAR while flat, and sells short when it moves below while flat. Exits a position when the close crosses back through the SAR.
Best run of 8. USD/JPY, 4 hours, spread 1, from run sweeps:2026-10-04-USDJPY-4h-opt.tsv:27.
| Period | Up to 2026-10-04 |
| Instrument | USD/JPY, 4 hours |
| Spread | 1 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 4 hours | n/a | 1,500 | 42.73 | 449,230 USD | -230,340 |
| Dow Jones | Daily | n/a | 726 | 41.74 | 19,396 EUR | -6,158 |
| GBP/USD | Daily | n/a | 596 | 42.45 | 12,417 USD | -6,199 |
| Nasdaq 100 | 4 hours | n/a | 1,424 | 42.49 | 8,213 EUR | -4,362 |
| DAX 40 | Daily | n/a | 675 | 43.11 | 7,660 EUR | -3,760 |
| Brent Crude | 4 hours | n/a | 758 | 41.95 | 6,719 EUR | -3,649 |
| DAX 40 | 4 hours | n/a | 1,361 | 41.07 | 6,073 EUR | -5,427 |
| S&P 500 | Daily | n/a | 760 | 41.18 | 2,032 EUR | -1,264 |
Charts
The code
// ============================================================== // Parabolic SAR Histogram Flip // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE last = 0 mySar = SAR[0.02,0.02,0.2] hist = close - mySar
27 more lines: the entry and exit rules.
Setup
Questions
Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.
It was tested on 8 market and timeframe combinations. The best run by trade count was USD/JPY, 4 hours, with 1,500 trades.
The best run had a maximum drawdown of 230,340 USD at the tested position size, against a net result of 449,230 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.