ta.wpr()Williams %R
Williams %R is a momentum indicator that measures overbought and oversold levels on a scale from -100 to 0.
Syntax
ta.wpr(length) → series floatArguments
| Parameter | Type | Description |
|---|---|---|
| length | series int | Lookback length for the highest high and lowest low. |
Returns
Williams %R.
Remarks
na values in the source series are ignored.
Code Examples
//@version=6
indicator("ta.wpr")
plot(ta.wpr(14))Trading Applications
Identify overbought (above -20) and oversold (below -80) conditions
Generate reversal signals at extreme levels
Confirm trend strength with sustained readings
Use divergences for early reversal detection
Frequently Asked Questions
Generate ta.wpr() Code with AI
Draft Pine Script using ta.wpr() with Pineify's AI Coding Agent, then review the arguments and test the result on your chart. Usage depends on your plan and available credits.
Related Pine Script Functions
ta.stoch() - Stochastic Oscillator
Learn how to use ta.stoch() in Pine Script. Syntax, parameters, code examples for the Stochastic Oscillator.
ta.rsi() - Relative Strength Index
Learn how to use ta.rsi() in Pine Script. Syntax, parameters, code examples for the RSI momentum oscillator.
ta.cci() - Commodity Channel Index
Learn how to use ta.cci() in Pine Script. Syntax, parameters, code examples for the CCI momentum indicator.
ta.cmo() - Chande Momentum Oscillator
Learn how to use ta.cmo() in Pine Script. Syntax, parameters, code examples for the Chande Momentum Oscillator.
ta.mfi() - Money Flow Index
Learn how to use ta.mfi() in Pine Script. Syntax, parameters, code examples for the volume-weighted RSI indicator.