vdubus

VDUB BB %B REVERSAL_v2 + BAR COLOUR

* UPDATE BY REQUEST
VDUB BB %B REVERSAL_v2 + BAR COLOUR
Remove from Favorite Scripts Add to Favorite Scripts
study(title = "VDUB BB %B REVERSAL_v2 + BAR COLOUR", shorttitle = "vdub_BB_%B_rev_v2_COLOUR")
length = input(21, minval=1)
src = input(close, title="Source")
mult = input(0.001, minval=0.001, maxval=50)
basis = sma(src, length)
dev = mult * stdev(src, length)
upper = basis + dev
lower = basis - dev
bbr = (src - lower)/(upper - lower)
plot(bbr, color=teal, style=histogram, linewidth=4)
plot(bbr, color=black, style=line, linewidth=2)

barcolor( bbr > 0 ? green :red)
//========================bgcolor=================================

timeinrange(res, sess) => time(res, sess) != 0
premarket = #0050FF
regular = #0000FF
postmarket = #5000FF
notrading = na
sessioncolor = timeinrange("30", "0400-0930") ? premarket : timeinrange("30", "0930-1600") ? regular : timeinrange("30", "1600-2000") ? postmarket : notrading
bgcolor(sessioncolor, transp=85)
This script was updated: VDUB BB %B REVERSAL_v3 + BAR COLOUR
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out