The system buys when the 14-period Williams %R crosses above -80, which signals a move out of oversold territory. It closes the long when the indicator crosses below -20.
Best run of 11. S&P 500, 4 hours, spread 1, from run pf:2026-10-11-USA500-4h.tsv:1.
| Period | Up to 2026-10-11 |
| Instrument | S&P 500, 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| S&P 500Best run | 4 hours | 1.49 | 796 | 67.34 | 4,790 EUR | -1,009 |
| Nikkei 225 | 4 hours | n/a | 631 | 64.50 | 31,948 USD | -8,972 |
| Dow Jones | Daily | n/a | 377 | 71.35 | 26,406 EUR | -9,560 |
| Nasdaq 100 | Daily | n/a | 288 | 66.32 | 18,543 EUR | -4,918 |
| Dow Jones | 4 hours | n/a | 254 | 65.35 | 14,982 EUR | -8,313 |
| Nasdaq 100 | 4 hours | n/a | 743 | 67.70 | 14,912 EUR | -4,991 |
| DAX 40 | 4 hours | n/a | 741 | 65.45 | 14,589 EUR | -5,366 |
| DAX 40 | Daily | n/a | 408 | 59.07 | 11,095 EUR | -4,085 |
| FTSE 100 | Daily | n/a | 310 | 69.35 | 8,820 EUR | -2,552 |
| S&P 500 | Daily | n/a | 390 | 70.51 | 4,547 EUR | -1,175 |
| Gold | Daily | n/a | 334 | 56.59 | 1,607 EUR | -819 |
Charts
Top 10 of 11 runs. The full list is in the table above.
The code
// ============================================================== // Percent R Threshold Crossover // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE wr = -50 hh = highest[14](high) ll = lowest[14](low)
13 more lines: the entry and exit rules.
Setup
S&P 500 had no history beyond the standard run, so both runs used 28,000 bars.
| Bars available | 28,000 |
| Net, standard 200,000-bar run | 4,789.75 EUR |
| Net, long run | 4,789.75 EUR |
| Net on the older data alone | 0.00 EUR |
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 11 market and timeframe combinations. The best run was S&P 500, 4 hours, with a profit factor of 1.49 over 796 trades.
The best run had a maximum drawdown of 1,009 EUR at the tested position size, against a net result of 4,790 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.