Overview
The Williams percent range (Williams %R or %R) is a momentum oscillator that shows the current close relative to the highest high and lowest low over a chosen lookback period (commonly 14 periods). The indicator ranges from 0 to −100 and is used to identify overbought and oversold readings, generate entry/exit signals, and spot momentum divergences.
Key points at a glance
– Default lookback: 14 periods (can be days, hours, minutes depending on your timeframe).
– Scale: 0 (close = highest high) to −100 (close = lowest low).
– Typical thresholds: above −20 = overbought; below −80 = oversold.
– Common signals: cross above −80 = buy (exit oversold); cross below −20 = sell (exit overbought).
– Related: fast stochastic %K is mathematically linked to %R (they are essentially the same information expressed differently).
1) The formula and interpretation
Raw formula:
%R = (HighestHigh − Close) / (HighestHigh − LowestLow)
To convert to the common Williams %R scale (0 to −100):
Williams %R = −100 × (HighestHigh − Close) / (HighestHigh − LowestLow)
Where:
– HighestHigh = highest price in the lookback period (e.g., last 14 periods)
– LowestLow = lowest price in the lookback period
– Close = most recent closing price
Example:
– Highest high (14-period) = 50
– Lowest low (14-period) = 40
– Close = 48
Compute: (50 − 48) / (50 − 40) = 2 / 10 = 0.2 → Williams %R = −100 × 0.2 = −20
Interpretation: reading at −20 (right at overbought threshold).
Note on relationship to stochastic:
If %K_fast = 100 × (Close − LowestLow) / (HighestHigh − LowestLow), then Williams %R = %K_fast − 100 (i.e., %R is essentially the inverse/negative representation of fast %K).
2) How to calculate (practical steps)
Manual/mental steps:
1. Select your lookback period (typical = 14).
2. Find the highest high and lowest low over that lookback.
3. Plug values into the formula and multiply by −100 to get a value between 0 and −100.
4. Plot the resulting value as a single line oscillator and mark −20 and −80 levels.
Excel example:
Assume column A has dates, column B has high, C has low, D has close, rows 2..n.
– HighestHigh (14-period) in E2: =MAX(B2:B15)
– LowestLow (14-period) in F2: =MIN(C2:C15)
– Williams %R in G2: =-100*(E2-D15)/(E2-F2)
(Adapt ranges to align properly with row offsets; use rolling ranges or OFFSET for dynamic windows.)
Pandas/Python snippet:
# df has columns: ‘High’, ‘Low’, ‘Close’
lookback = 14
hh = df[‘High’].rolling(window=lookback).max()
ll = df[‘Low’].rolling(window=lookback).min()
williams_r = -100 * (hh – df[‘Close’]) / (hh – ll)
df[‘Williams_%R’] = williams_r
3) Signals and practical trading rules
Basic level-based signals:
– Buy: %R crosses above −80 (moving out of oversold).
– Sell/short: %R crosses below −20 (moving out of overbought).
– Neutral/hold: readings between −80 and −20.
Divergences:
– Bullish divergence: price makes lower low while %R makes a higher low → potential bullish reversal.
– Bearish divergence: price makes higher high while %R fails to make a new high → potential bearish reversal.
Practical rules and risk management (example strategy):
1. Timeframe and trend filter:
• Use %R on your trading timeframe (e.g., daily). For direction bias, only take buys when price is above a 50- or 200-period moving average; only take shorts when below it.
2. Entry:
• Long entry when %R crosses above −80 and price is above trend filter (or confirmed by bullish price action).
3. Stop-loss:
• Place stop just below the recent swing low or below a defined ATR multiple (e.g., 1.0–1.5 ATR).
4. Profit target / exit:
• Fixed risk:reward (e.g., 1:2) or exit when %R crosses back below −20 or when bearish trend confirmation occurs.
5. Position sizing:
• Limit position size by volatility (ATR) or fixed percent risk per trade (e.g., 1% of account).
6. Confirmations (recommended):
• Volume expansion on the reversal, RSI trend alignment, MACD crossover, ADX > 20 to indicate a trend.
4) Parameters and sensitivity
– Lookback length: shorter (e.g., 7) makes %R more responsive but increases false signals; longer (e.g., 21) smooths and reduces noise but lags.
– Thresholds: −20/−80 are standard; some traders use −10/−90 for aggressive signals or −30/−70 for quieter markets.
– Smoothing: some traders apply a short SMA (e.g., 3) to the %R line to reduce whipsaws.
5) Williams %R vs. Fast Stochastic Oscillator
– Both measure close relative to high-low range, but scales differ: %R = 0 to −100; stochastic = 0 to 100.
– Fast stochastic shows %K and a smoothed %D line (gives crossover signals); %R is a single line (simpler but less cross-signal nuance).
– %R tends to be slightly more responsive and may produce earlier signals; stochastic crossovers can offer extra confirmation.
6) Limitations and common pitfalls
– Whipsaws in choppy/rangebound markets: many false signals.
– Overbought does not mean immediate reversal: in strong trends, overbought readings can persist.
– Lookback-only: %R only uses price extremes within the lookback window—no volume or broader context.
– Lag and mis-timed exits: like most oscillators, %R lags price and may signal too late on fast reversals.
7) How to make Williams %R more robust
– Use a trend filter: only take signals in the direction of the higher-timeframe trend or relative to a moving average.
– Combine with other indicators:
• MACD for trend confirmation and momentum direction.
• RSI for a smoother overbought/oversold view.
• ADX to verify trend strength (e.g., only trade crossovers if ADX > 20).
• Bollinger Bands: combine %R signals near band extremes for volatility confirmation.
– Multi-timeframe confirmation: require alignment between a higher timeframe %R and your trading timeframe.
– Smoothing and filtering: use a short SMA on %R or require two consecutive bars crossing thresholds.
– Backtest and forward-test: validate any rules on historical data and run live paper trades before committing capital.
8) When to use Williams %R
– Rangebound markets: to spot short-term reversals within a range.
– Swing trading: identify entry and exit points when combined with trend analysis.
– Day trading (short lookbacks): short-period %R can capture intraday overbought/oversold moves.
– Avoid relying on it in isolation—use confirmatory price action and other indicators.
9) How accurate is Williams %R?
– No indicator is inherently “accurate” on its own. Accuracy depends on:
• Market conditions (trending vs. choppy).
• Parameter settings (lookback and smoothing).
• Proper use with filters and risk management.
– In practice, %R performs acceptably as a component of a multi-factor strategy but can produce many false positives if used alone.
10) Practical checklist before taking a trade using Williams %R
1. Identify timeframe and set lookback (default 14).
2. Check higher-timeframe trend (e.g., price relative to 50/200 SMA).
3. Verify %R signal (cross above −80 for long or below −20 for short).
4. Confirm with at least one additional signal (MACD, RSI, ADX, price action, volume).
5. Define stop-loss (swing low/high or ATR-based) and position size (risk %).
6. Set realistic target(s) or exit rule (risk:reward or indicator-based).
7. Log trade and outcome for iterative improvement.
11) Backtesting and implementation tips
– Always backtest with realistic spreads, slippage, and commissions.
– Use out-of-sample testing and walk-forward analysis to avoid overfitting.
– Track win rate, average win/loss, max drawdown, and expectancy.
– Consider Monte Carlo simulations of equity curves to assess robustness.
12) Example simple rule set (for illustration only)
– Timeframe: daily; lookback: 14.
– Trend filter: 50-day SMA; only take longs if Close > SMA.
– Entry: %R crosses above −80.
– Stop: below recent swing low by 1% or 1 × ATR(14).
– Take profit: 2 × risk or exit when %R > −20.
– Position size: risk 1% of portfolio.
The bottom line
Williams %R is a simple, fast oscillator that gives immediate information about where the current close sits relative to a recent range. It’s useful for spotting overbought/oversold conditions and divergences but is best used with trend filters and confirming indicators to reduce false signals. As with any technical tool, test parameters and rules thoroughly, use disciplined risk management, and avoid reliance on %R alone.
Further reading and source
– Investopedia: Williams %R —
Editor’s note: The following topics are reserved for upcoming updates and will be expanded with detailed examples and datasets.