Join waitlist
Strategies / Mean reversion / Percent R Threshold Crossover

Percent R Threshold Crossover

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.

Mean reversionLong onlySwingS&P 5004 hours
1.49Profit factor
4,790Net profit EUR
67.34%Win rate
796Trades
-1,009Max drawdown
6.02Avg trade

Best run of 11. S&P 500, 4 hours, spread 1, from run pf:2026-10-11-USA500-4h.tsv:1.

Entry rules, long

  1. Williams %R (14 periods) crosses above -80.

Exit rules

  1. No stop loss or profit target is set.

Test conditions

PeriodUp to 2026-10-11
InstrumentS&P 500, 4 hours
Spread1 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best run4 hours1.49 79667.344,790 EUR-1,009
Nikkei 2254 hoursn/a 63164.5031,948 USD-8,972
Dow JonesDailyn/a 37771.3526,406 EUR-9,560
Nasdaq 100Dailyn/a 28866.3218,543 EUR-4,918
Dow Jones4 hoursn/a 25465.3514,982 EUR-8,313
Nasdaq 1004 hoursn/a 74367.7014,912 EUR-4,991
DAX 404 hoursn/a 74165.4514,589 EUR-5,366
DAX 40Dailyn/a 40859.0711,095 EUR-4,085
FTSE 100Dailyn/a 31069.358,820 EUR-2,552
S&P 500Dailyn/a 39070.514,547 EUR-1,175
GoldDailyn/a 33456.591,607 EUR-819

Charts

Results by run

Top 10 of 11 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

Williams %R
Longer historyRe-run on up to 1,000,000 barsS&P 500 · 4 hours · older data 0.00 EUR

S&P 500 had no history beyond the standard run, so both runs used 28,000 bars.

S&P 500 · 4 hours

Bars available28,000
Net, standard 200,000-bar run4,789.75 EUR
Net, long run4,789.75 EUR
Net on the older data alone0.00 EUR
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run Percent R Threshold Crossover in ProOrder?

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.

Which markets was it tested on?

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.

How large was the drawdown?

The best run had a maximum drawdown of 1,009 EUR at the tested position size, against a net result of 4,790 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Oversold Mean Reversion Long

Uses the same indicator.

1.73 PF · 833 trades

CCI Sign With EMA Alignment

Best run on the same market, S&P 500.

1.23 PF · 1,253 trades

Bollinger Bounce With MACD Volume

Also a mean reversion strategy.

1.50 PF · 139 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

Copy trading on US indices is available to ProRealAlgos members as spots open.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs