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.

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: December 29, 2024

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