ta.wpr() - Pine Script Function
ta.wpr()
Section titled “ta.wpr()”Overview
Section titled “Overview”Williams %R. The oscillator shows the current closing price in relation to the high and low of the past ‘length’ bars.
Syntax
Section titled “Syntax”ta.wpr(length) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| length | series int | Number of bars. |
Returns
Section titled “Returns”Williams %R.
Remarks
Section titled “Remarks”- na values in the source series are ignored.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("Williams %R", shorttitle="%R", format=format.price, precision=2)plot(ta.wpr(14), title="%R", color=color.new(#ff6d00, 0))