Buys on a close above the 200-period average but below the 10-period average, or on a close over 14% below the 52-bar high. Exits when the close is above the 10-period average and below the prior low, or after a 15% fall from entry.
Best run of 14. S&P 500, Daily, spread 1, from run pf:2026-10-12-USA500-D.tsv:18.
| Period | Up to 2026-10-12 |
| Instrument | S&P 500, Daily |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| S&P 500Best run | Daily | 2.39 | 441 | 70.52 | 8,052 EUR | -1,192 |
| Nasdaq 100 | Daily | 2.21 | 401 | 68.83 | 29,735 EUR | -4,537 |
| Nasdaq 100 | 4 hours | 1.67 | 833 | 68.07 | 23,502 EUR | -2,775 |
| S&P 500 | 4 hours | 1.56 | 822 | 67.40 | 5,503 EUR | -850 |
| EUR/USD | Daily | n/a | 238 | 59.66 | 88,373 USD | -44,690 |
| Nikkei 225 | 4 hours | n/a | 550 | 62.00 | 39,669 USD | -9,420 |
| Nikkei 225 | Daily | n/a | 377 | 68.17 | 37,168 USD | -20,937 |
| Dow Jones | Daily | n/a | 398 | 69.35 | 34,797 EUR | -11,492 |
| Dow Jones | 4 hours | n/a | 237 | 69.20 | 18,188 EUR | -6,134 |
| DAX 40 | Daily | n/a | 549 | 61.38 | 15,834 EUR | -5,943 |
| Dow Jones | 1 hour | n/a | 797 | 62.36 | 13,052 EUR | -7,010 |
| FTSE 100 | Daily | n/a | 353 | 67.71 | 7,865 EUR | -3,642 |
| Nasdaq 100 | 30 min | n/a | 3,964 | 58.63 | 7,169 EUR | -3,891 |
| Gold | Daily | n/a | 313 | 60.38 | 2,703 EUR | -1,448 |
Charts
Top 10 of 14 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Pullback and Dip Buying Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE buyprice = 0 malong = Average[200](close) mashort = Average[10](close) hh = highest[52](high) drop = (hh - close) / hh * 100 buycond = 0
20 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 14 market and timeframe combinations. The best run was S&P 500, Daily, with a profit factor of 2.39 over 441 trades.
The best run had a maximum drawdown of 1,192 EUR at the tested position size, against a net result of 8,052 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.