Join today
Strategies / Mean reversion / Williams %R Reversal

Williams %R Reversal: Oversold and Overbought Crosses Tested

A long triggers when Williams %R(14) crosses above -80, and a short when it crosses below -20. Longs close once %R is above -50 and shorts once it is below -50. A 1% stop protects each trade.

Mean reversionLong & shortIntradayNasdaq 10030 min
n/aProfit factor
-49,262Net profit EUR
50.90%Win rate
15,667Trades
-52,557Max drawdown
-3.14Avg trade

Best run of 16. Nasdaq 100, 30 min, spread 3, from run sweeps:2026-09-07-NAS100-30m-opt.tsv:20.

Entry rules, long

  1. Members only
  2. No position is open

Entry rules, short

  1. Members only
  2. No position is open

Exit rules

  1. Stop loss at 1% from entry
  2. Members only
  3. Close a short when %R is below -50

Test conditions

PeriodUp to 2026-09-07
InstrumentNasdaq 100, 30 minutes
Spread3 points
Contracts1
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-09-07

Parameters

positionSize
Contracts per trade
1
williamsPeriod
Williams %R length
14
oversoldLevel
Buy when %R climbs back above this
-80
overboughtLevel
Sell short when %R drops back below this
-20
williamsExitLevel
Close the trade when %R passes the midpoint
-50
stopLossPct
Protective stop, percent of entry price
1

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best run30 minn/a 15,66750.90-49,262 EUR-52,557
S&P 5001 hourn/a 10,26356.35-7,052 EUR-8,015
Gold1 hourn/a 9,69957.39-9,119 EUR-9,156
Gold15 minn/a 14,46854.14-9,529 EUR-9,665
Gold5 minn/a 14,14254.80-9,878 EUR-9,935
Gold30 minn/a 14,83056.59-10,448 EUR-10,499
S&P 5005 minn/a 14,24350.78-13,127 EUR-13,148
S&P 50030 minn/a 15,19653.33-14,271 EUR-14,775
S&P 50015 minn/a 14,58355.94-15,426 EUR-15,445
Nasdaq 1001 hourn/a 10,80152.13-28,487 EUR-29,626
DAX 401 hourn/a 9,34159.93-36,842 EUR-37,955
DAX 4015 minn/a 14,65060.25-42,611 EUR-44,380
Nasdaq 1005 minn/a 14,12558.06-46,027 EUR-46,375
DAX 405 minn/a 14,31956.23-47,307 EUR-47,598
Nasdaq 10015 minn/a 14,79559.13-50,134 EUR-52,157
DAX 4030 minn/a 15,09759.31-59,845 EUR-63,442

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-100K-50KS&P 500 · 1 hourGold · 1 hourGold · 15 minGold · 5 minGold · 30 minS&P 500 · 5 minS&P 500 · 30 minS&P 500 · 15 minNasdaq 100 · 1 hourDAX 40 · 1 hourDAX 40 · 15 minNasdaq 100 · 5 minDAX 40 · 5 minNasdaq 100 · 30 minNasdaq 100 · 15 minDAX 40 · 30 min

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// Williams %R Reversal
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long & short
// Timeframe tested: 30 minutes
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1          // contracts per trade
williamsPeriod = 14       // Williams %R length
oversoldLevel = -80       // buy when %R climbs back above this
overboughtLevel = -20     // sell short when %R drops back below this
williamsExitLevel = -50   // close the trade when %R passes the midpoint
stopLossPct = 1           // protective stop, percent of entry price

// --- Indicators ---
williamsValue = Williams[williamsPeriod](close)

26 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • All markets in the table lost money, and the best listed run on Nasdaq 100 30 minutes lost EUR -49,261.7.
  • The average trade was EUR -3.14 across 15,667 trades, so costs and weak exits drain the account steadily.
  • Drawdowns were deep, EUR 63,441.7 on DAX 40 30 minutes.
  • Profit factor was not recorded because only sweep data exists.

Indicators used

Williams %R

How to load it

  1. Copy the code with the copy button above 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.

Questions

About this strategy

Is Williams %R Reversal worth running in ProOrder?

It can run in ProOrder, but every backtest lost money. It is shown here as a result, not a recommendation.

Which markets were tested?

Nasdaq 100, S&P 500, Gold and DAX 40. The smallest loss was S&P 500 1 hour at EUR -7,051.78, and DAX 40 30 minutes lost EUR -59,845.2.

What drawdown came with 1 contract?

The Nasdaq 100 run had a EUR 52,556.9 drawdown with 1 contract.

Did any timeframe work?

No. Every run from 5 minutes to 1 hour lost money.

Related

Strategies like this one

ADX Momentum EMA

Uses the same indicator.

n/a PF · n/a trades

Negated Hammer

Best run on the same market, Nasdaq 100.

3.20 PF · 372 trades

Monday Dip Buy

Also a mean reversion strategy.

n/a PF · 146 trades

Find out which reversal systems passed our tests. Join the ProRealAlgos waitlist.

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