Momentum OscillatorsPine Script v6

ta.wpr()

Williams %R

Williams %R is a momentum indicator that measures overbought and oversold levels on a scale from -100 to 0.

Syntax

Syntax
ta.wpr(length) → series float

Arguments

ParameterTypeDescription
lengthseries intLookback length for the highest high and lowest low.

Returns

Williams %R.

Remarks

na values in the source series are ignored.

Code Examples

Pine Script v6 Example
//@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

Related Functions

Frequently Asked Questions

Generate ta.wpr() Code with AI

Skip the manual coding. Use Pineify's AI Coding Agent to generate Pine Script code using ta.wpr() and other built-in functions instantly.