本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。
study(title="[RS]Dolchian/Bollinger Hybrid V0", shorttitle="[RS]DBH.V0", overlay=true)
tf = input(24)
factor = tf*(syminfo.mintick*10)
trend = round(hl2/factor)*factor
smoothtrend = sma(trend, tf)
band1 = max(smoothtrend-stdev(trend, tf)*(tf*0.125), lowest(tf))
band2 = min(smoothtrend+stdev(trend, tf)*(tf*0.125), highest(tf))
//plot(trend)
plot(smoothtrend, color=black)
b1 = plot(band1, color=gray)
b2 = plot(band2, color=gray)
fill(b1,b2, color=gray, transp=75)