Skip to content
Algo Trade Analytics Docs

ta.wpr() - Pine Script Function

Williams %R. The oscillator shows the current closing price in relation to the high and low of the past ‘length’ bars.

ta.wpr(length) → series float
NameTypeDescription
lengthseries intNumber of bars.

Williams %R.

  • na values in the source series are ignored.
//@version=6
indicator("Williams %R", shorttitle="%R", format=format.price, precision=2)
plot(ta.wpr(14), title="%R", color=color.new(#ff6d00, 0))