← Back to Home
Trading Signal / Indicator
πŸ“‘

Williams %R

A fast, sensitive overbought/oversold indicator by Larry Williams.

Start Automating Free β†’

Want to automate this strategy? Try auto-Trading free β€” no credit card required.

Williams %R chart

Overview

What is Williams %R?

Williams %R (pronounced "Williams Percent R") is a momentum indicator developed by Larry Williams, similar to the Stochastic Oscillator but inverted. It measures the close price relative to the highest high over a lookback period, scaled from βˆ’100 to 0. Values near 0 indicate overbought conditions; values near βˆ’100 indicate oversold.

Formula: %R = (Highest High βˆ’ Close) Γ· (Highest High βˆ’ Lowest Low) Γ— βˆ’100

Readings above βˆ’20 (near 0) indicate overbought conditions β€” price is closing near the top of its recent range. Readings below βˆ’80 indicate oversold conditions β€” price is closing near the bottom of its recent range. Buy signals occur when %R crosses back up through βˆ’80 from below (exiting oversold territory); sell signals when it crosses back down through βˆ’20 from above.

Williams %R is known for its ability to predict reversals 1–2 periods before other oscillators, making it popular for short-term and intraday traders. Like all oscillators, it works best in range-bound markets and should be used with a trend filter in trending environments.

The indicator also generates powerful divergence signals: when price makes a new low but %R fails to reach new oversold readings, bullish divergence suggests a reversal is approaching.

How It Works in auto-Trading

Automate It

auto-Trading computes Williams %R over a configurable period (default 14). The strategy builder supports level crossover signals (crossing βˆ’20/βˆ’80 thresholds), divergence detection, and combination with trend filters. %R can be used as a standalone entry signal or as a timing filter within a larger strategy framework.

Try Free β†’

Strategy Code

Pick a script below, copy it, and use it on your chart.

Pine Script (TradingView)

This is a TradingView Pine Script example for this indicator. Paste it into the TradingView Pine Editor, add it to your chart, and adjust inputs for your market and timeframe.

//@version=6
strategy("Williams %R", overlay=true)
fastLen = input.int(20, "Fast Length")
slowLen = input.int(50, "Slow Length")
fast = ta.ema(close, fastLen)

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

ThinkScript (thinkorswim)

This is a thinkorswim ThinkScript example for this indicator. Open thinkorswim, create a custom study, paste the script, and apply it to your chart.

input length = 14;
def wpr = WilliamsPercentR(length = length);
def buySignal = wpr crosses above -80;
def sellSignal = wpr crosses below -20;
AddOrder(OrderType.BUY_AUTO, buySignal, close, 1, Color.GREEN, Color.GREEN, "WPR Buy");

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

Ready to automate Williams %R?

Join thousands of traders who use auto-Trading to execute this strategy automatically, 24/7.

Get Started Free β†’

All Strategies & Signals

Continue Learning

Trading Strategies

Trading Signals & Indicators