Williams %R

2284 visningar
I needed the %R code in one of my indicators and TradingVeiw have it hidden. So here is my attempt.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?
study(title="Williams %R ", shorttitle="%R")
// Williams %R 
highLine = input(90)
lowLine  = input(10)
length   = input(10, minval=1)
upper    = highest(length)
lower    = lowest(length)
output   = 100* (close - upper) / (upper - lower) + 100

plot(output, color=black, linewidth=1, title="%R line")
plot(highLine, title="overbought")
plot(lowLine, title= "oversold")


I am looking %R indicator with histogram plotted in...Can you please help me.