williams percent r trading strategy

Williams %R Trading Strategy – Williams Percent Range vs RSI (Backtest, Indicator & Systems)

Williams %R was developed by the famous trader and tax rebellion Larry Williams, who has given names to several technical indicators. Last week we wrote about the WilliamsVixFix indicator, and today we are explaining the Williams %R trading strategy and how to calculate and use the indicator.

Williams %R does work. In this article, we explain how to use Williams %R in a trading strategy, and finally, we backtest trading strategies to see if Williams %R works. Does it work? Our conclusion is that Williams %R seems to work pretty well.

What is the Williams %R indicator?

The Williams %R fluctuates between 0 to -100. It’s an oscillating indicator and reflects the current close relative to the highest high for the lookback period.

The indicator is somewhat similar to the stochastic indicator, however, that one measures the close relative to the lowest low. A high reading is considered overbought, and low readings are considered oversold.

Here is how a 5-day lookback period looks in the S&P 500:

Williams %R trading strategy

Williams %R goes quickly from overbought and oversold conditions. Thus, it is mainly used as a mean reversion indicator.

How do you calculate the Williams %R indicator?

If you use a lookback period of five days the formula looks like this:

Williams %R = (  ( highest high last 5 days – close ) / ( highest high last 5 days – lowest low last 5 days)  )* -100

For example:

If the close today is 100, the highest high over the last five days was 115, and the lowest low over the last five days was 95, then the Williams %R is -75 ( (15/20) *-100 )

Williams %R resembles WilliamsVixFix

The Williams %R is pretty similar to the WilliamsVixFix (but inversely from each other). The chart below is both indicators using a 22-day lookback period:

Williams %R trading strategy backtest

Williams %R – does it work? We backtest some strategies

We backtest the Williams %R trading strategy on the S&P 500 (SPY) and we make the following trading rules:


By using optimization we get, perhaps as expected, the best results on short lookback periods. We used a minimum lookback period of two days and a maximum of 25 days. All tests gave a profit factor of two or more, except for 25 days which produced 1.9.

The best result is by using a two-day lookback period. This gives this equity curve:

Both during the GFC in 2008/09 and the Covid-19, the strategy performed exceptionally well. The percentage returns in 2008 and 2020 were 98.9% and 43.3%! During the bear market of 2022, it rose 15.7%, still pretty decent!

The returns above are compounded. CAGR is 11.5% (buy and hold is 9.7%), exposure is 22%, the number of trades is 588, average gain per trade is 0.59%, max drawdown is 17%, and the profit factor is 2.2. These are pretty good numbers!

Does the Williams %R work for shorts?

Unfortunately, and as expected, it’s much more difficult to find profitable strategies on the short side.

Williams %R Amibroker code

If you would like the Williams %R code for Amibroker you can order it at the link below. Additionally, you get the code for all the other free trading strategies we have published:

Williams %R vs. RSI: we test different trading strategies

What is the best indicator: Williams %R or the RSI indicator?

The Williams %R is a mean revertive indicator, just like the Relative Strength Indicator (RSI) and Stochastics. Let’s test a trading strategy based on the RSI which is quite similar criteria as we did above for the Williams %R:

  • Enter on the close when the two-day RSI is below 10
  • Exit on the close when the close is higher than yesterday’s high or when the RSI(2) ends higher than 70

These criteria yield this equity curve:

Williams %R trading strategy trading rules

The CAGR is substantially lower than for the Williams %R: 6.23% vs 12.4%. Thus, the Williams %R seems to work better for the S&P 500 than the RSI.

Of course, the difference could be entirely due to chance and randomness. However, we suggest traders should test their RSI strategies and see if they can improve them by using Williams %R.

Williams %R works perfectly with this indicator

We changed the settings somewhat to test another strategy that included a second indicator and we got this equity curve on Nasdaq/QQQ (logarithmic):

The CAGR is 14% (buy and hold is 9%), the time spent in the market is 14.1%, 247 trades, 78% winners, the average winner is 2.3%, the average loser is 2.1%, the profit factor is 3.3, max drawdown is 20.5%, and the Sharpe Ratio is 3.16.

Would you like to know the code and the criteria (in Amibroker/Tradestation and plain English)? You can either order the strategy by clicking the link below, or you can subscribe to our Trading Edges. You can order the strategy on this link (please choose Williams %R Strategy No. 3):


When you have paid, please press the link below to access the code (PDF file):

Download the Williams %R strategy no. 3 by clicking here (you need to pay for access)

Alternatively, you can subscribe to our Trading Edges where we send out ideas like this monthly for a lower fee per edge. The edge above will be presented as an edge in a few months.

Conclusion: Williams %R does work

The Williams %R trading strategies are pretty similar to the WilliamsVixFix. However, it seems like the Williams %R performs slightly better in our backtests. Moreover, on a wide range of backtests, Williams %R seems to perform better than both the RSI and Stochastics in the strategies we tested.

We believe the Williams %R is an underappreciated indicator!

Similar Posts