UDAY_C_Santhakumar

UCS_BB %B with BB

A sneaky way to notice the real overbought and oversold levels with BB%B.

Uday C Santhakumar
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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study(title = "Bollinger Bands %B Bollinger Bands", shorttitle = "BB %B BB")
source = close
length = input(20, minval=1), mult = input(2.0, minval=0.001, maxval=50)
basis = sma(source, length)
dev = mult * stdev(source, length)
upper = basis + dev
lower = basis - dev
bbr = (source - lower)/(upper - lower)
plot(bbr, color=teal)

basisa = sma(bbr, length)
deva = mult * stdev(bbr, length)
uppera = basisa + deva
lowera = basisa - deva
plot(basisa, color=red)
p1 = plot(uppera, color=blue)
p2 = plot(lowera, color=blue)
fill(p1, p2)