P
PipsGrowth

Key Takeaways

Difficulty:Beginner
Reliability:Moderate
Category:momentum
Timeframes:15M, 1H, 4H

Williams %R

momentumšŸ“Š 15M, 1H, 4H

Momentum oscillator measuring overbought/oversold levels on a scale of 0 to -100.

Formula

Code
Williams %R = (Highest High - Close) / (Highest High - Lowest Low) Ɨ -100

Detailed Explanation

Williams %R was developed by Larry Williams. It's similar to the Stochastic Oscillator but uses an inverted scale.

Key Levels:
- 0 to -20: Overbought
- -80 to -100: Oversold

Key Difference from Stochastic:
Williams %R compares close to the high of the range, while Stochastic compares to the low.

Trading Setup Example

Entry, stop loss, and take profit levels.

šŸ“ˆ Buy Setup
Williams %R703050Oversold!EntryTake ProfitStop LossCandlesIndicatorOversoldBUY
šŸ“‰ Sell Setup
Williams %R703050Overbought!EntryTake ProfitStop LossCandlesIndicatorOverboughtSELL

Always wait for signal confirmation before entering a trade.

Where This Indicator Works Best

Trend context and market position.

šŸ“ˆ Bullish Context
OBOSOversold!Ranging MarketBest Fit āœ“Buy Signal
šŸ“‰ Bearish Context
OBOSOverbought!Ranging MarketBest Fit āœ“Sell Signal

Detects overbought/oversold in trending and ranging markets.

Live Chart — Williams %R

See Williams %R in action on a live chart. Try changing the settings and timeframe.

Parameters

Period
Default: 14
Lookback period

šŸ“ˆ Bullish Signals

Williams %R crosses above -80 from oversold

šŸ“‰ Bearish Signals

Williams %R crosses below -20 from overbought

Python Implementation

Williams %R calculation

Python
import pandas_ta as ta
df['Williams_R'] = ta.willr(df['high'], df['low'], df['close'], length=14)

TradingView Pine Script

JavaScript
//@version=5
indicator("Williams %R")
wr = ta.wpr(14)
plot(wr, "Williams %R", color=color.purple)
hline(-20, "Overbought")
hline(-80, "Oversold")
šŸ“Š Use TradingView for Advanced Charting
Professional analysis tools with 100+ technical indicators
Get TradingView Pro

MT5 MQL5 Code

C++
int wr_handle = iWPR(_Symbol, _Period, 14);
double wr[];
CopyBuffer(wr_handle, 0, 0, 3, wr);

Common Mistakes

āœ—Confusing the inverted scale
āœ—Using in strong trending markets

Confirmation Signals

Price action
Support/resistance
Volume

Best For

Overbought/oversoldShort-term reversalsMarket timing

šŸ’” Pro Tips

  • •Scale is inverted: 0 to -100
  • •More sensitive than RSI
  • •Best in ranging markets
Last updated: February 8, 2026

Educational Disclaimer

This content is for educational purposes only and does not constitute financial or investment advice. Trading involves significant risk and you may lose your capital. Always consult a licensed financial advisor before making investment decisions.

Frequently Asked Questions

Williams %R - Complete Guide with Python & TradingView Code