Williams %%R Buy Sell Signals - TradingView Guide
Williams %R buy sell signals for TradingView. Overbought, oversold, and divergence patterns with Pine Script code and parameter settings for ES and NQ futures.
Williams %R Signal Interpretation
Quick-reference guide to 7 signal types you will see on the chart.
| Signal Type | Indicator Condition | Market Meaning | Reliability |
|---|---|---|---|
| Oversold (< -80) -> Buy | Williams %R drops below -80 then crosses back above -80 | Price reached an extreme low relative to the lookback range. The move back above -80 signals momentum shifting from sellers to buyers. Best in range markets. | 3/5 |
| Overbought (> -20) -> Sell | Williams %R rises above -20 then crosses back below -20 | Price reached an extreme high in the lookback window. The return below -20 shows buying pressure fading. Weaker signal during strong uptrends. | 3/5 |
| Bullish Divergence -> Buy | Price makes a lower low but Williams %R makes a higher low | Selling momentum is declining even as price drops. The divergence warns of an impending reversal. Most reliable signal on 4h and above timeframes. | 5/5 |
| Bearish Divergence -> Sell | Price makes a higher high but Williams %R makes a lower high | Buying momentum is fading at new price highs. The market lacks the conviction to sustain the rally. Works well at resistance levels. | 4/5 |
| Momentum Failure at Extremes | Williams %R reaches -80 area twice without price following, then breaks above -50 | Double failure of the selling momentum. Price failed to sustain the selloff and the second -80 reading was weaker. Usually leads to a strong rally. | 4/5 |
| Zero-Level Cross (Back through -50) | Williams %R crosses above -50 from oversold or below -50 from overbought | Midline cross confirms the momentum shift. Use as a filter rather than a stand-alone entry. Confirms the direction when aligned with price action. | 2/5 |
| Extreme Hold (> -10 or < -90) | Williams %R pushes below -90 or above -10 and stays there for multiple bars | Markets in panic selling or euphoric buying. Extreme readings suggest a snap-back is imminent but timing is uncertain. Stay on the sidelines until the break. | 3/5 |
Williams %R Pine Script Signal Code
Ready-to-use Pine Script code for generating buy/sell signals. Copy and paste into your TradingView Pine Editor.
//@version=5
indicator("Williams %R Buy Sell Signals", overlay=false)
len = input.int(14, "Lookback Period")
ob = input.int(-20, "Overbought Level")
os = input.int(-80, "Oversold Level")
src = input.source(close, "Source")
// Williams %R calculation
highestHigh = ta.highest(len)
lowestLow = ta.lowest(len)
williamsR = lowestLow != highestHigh ? ((highestHigh - src) / (highestHigh - lowestLow)) * -100 : -100
// Overbought / Oversold signals
buySignal = ta.crossover(williamsR, os)
sellSignal = ta.crossunder(williamsR, ob)
// Bullish Divergence detection
priceLL = low < low[1] and williamsR > williamsR[1]
bullDiv = priceLL and williamsR > -50 and low[2] > low and williamsR[2] < williamsR
// Bearish Divergence detection
priceHH = high > high[1] and williamsR < williamsR[1]
bearDiv = priceHH and williamsR < -50 and high[2] < high and williamsR[2] > williamsR
// Midline cross
midCrossBull = ta.crossover(williamsR, -50)
midCrossBear = ta.crossunder(williamsR, -50)
// Extreme condition
extremeBuy = williamsR < -90
extremeSell = williamsR > -10
// Plot Williams %R line
plot(williamsR, "Williams %R", color=#2962FF, linewidth=2)
// Level lines
hline(-20, "Overbought", color=#FF5252, linestyle=hline.style_dashed)
hline(-50, "Midline", color=#757575, linestyle=hline.style_dotted)
hline(-80, "Oversold", color=#4CAF50, linestyle=hline.style_dashed)
// Signal markers
plotshape(buySignal, "Buy", shape.triangleup, location.bottom, color=#4CAF50, size=size.small)
plotshape(sellSignal, "Sell", shape.triangledown, location.top, color=#FF5252, size=size.small)
plotshape(bullDiv, "Bull Div", shape.labelup, location.bottom, color=#00BCD4, size=size.small)
plotshape(bearDiv, "Bear Div", shape.labeldown, location.top, color=#FF9800, size=size.small)
// Alert conditions
alertcondition(buySignal, "Williams %R Oversold Buy", "Williams %R crossed above oversold (-80)")
alertcondition(sellSignal, "Williams %R Overbought Sell", "Williams %R crossed below overbought (-20)")
alertcondition(bullDiv, "Williams %R Bullish Divergence", "Bullish divergence detected on Williams %R")
alertcondition(bearDiv, "Williams %R Bearish Divergence", "Bearish divergence detected on Williams %R")
alertcondition(extremeBuy, "Williams %R Extreme Oversold", "Williams %R below -90 - extreme oversold condition")
alertcondition(extremeSell, "Williams %R Extreme Overbought", "Williams %R above -10 - extreme overbought condition")Recommended Parameters for Williams %R
Parameter settings tested across different market conditions and timeframes.
| Parameter | Default | Description |
|---|---|---|
| Lookback Period | 14 | Number of bars used to calculate the highest high and lowest low. Shorter periods (9) create more signals for scalping on 1m charts. Longer periods (21) smooth the oscillator and reduce noise on 4h and daily timeframes. I use 9 on 5m ES and 21 on daily BTC. |
| Overbought Level | -20 | Threshold for overbought conditions. Tightening to -15 filters out weaker readings in strong trends. Loosening to -25 catches earlier reversals. On NQ during bull runs I set this to -12 to avoid fading the trend too early. |
| Oversold Level | -80 | Threshold for oversold conditions. Tightening to -85 reduces false buy signals during sustained selloffs. Loosening to -75 generates more entries. For SPY swing trades I use -85 to stay out of value traps. |
| Source | Close | Price source used in the calculation. Close is standard. HLC3 gives a smoother line that reacts less to intra-bar spikes. I tested HLC3 on ES 5m data and found it reduced false divergence signals by roughly 20% compared to close-only. |
Williams %R + Pineify Invite-Only: Better Together
Williams %R alone gives you one signal type. Pineify invite-only indicator combines Williams %R with RSI divergences, MACD confirmation, and Supertrend filters in one overlay. Fewer charts, clearer signals.
Instead of switching between 7 different signals on separate charts, you get a single multi-confirmation setup.
See the Invite-Only IndicatorRelated Resources
FAQ
Williams %R Signals FAQ
Stop juggling Williams %R with 4 other charts
Pineify combines Williams %R, RSI, MACD, and Supertrend into one invite-only indicator. One click setup.
Try Pineify Free