vdubus

VDUB BB %B REVERSAL_v4

1094
By Request this is my own personal indicator modification which is just an upgrade from v3

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
study(title = "VDUB BB %B REVERSAL_v4", shorttitle = "vdub_BB_%B_rev_v4")
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)
plot(bbr, color = change(bbr) <= 0 ? gray : teal, style=line)
//----
barcolor( bbr > 0 ? green :red)
//========================bgcolor=================================
trade_session = input(title='Trade Session:', type=string, defval='0400-1500', confirm=false)
istradingsession2 = not na(time('1', trade_session))
bgcolor(istradingsession2?black:na, transp=80, offset=100, title="Trading session")
//
tf = input('240' )
tf_bool = na(tf_bool[1]) ? 0 : change(time(tf)) and tf_bool[1] == 0 ? 1 : change(time(tf)) and tf_bool[1] == 1 ? 0 : tf_bool[1]
bgcolor(tf_bool == 1 ? gray : silver, transp=70, offset=100, title="BO Expiry")