traderstu22

TS2_OpeningRange_IB_V1

60
Nothing no one has done before, just customized for my desires. Chris Moody inspired for certain.
开源脚本

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

免责声明

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

想在图表上使用此脚本?
study(title="TS2_OpeningRange_IB_V1", shorttitle="TS2_OpeningRange_IB_V1", overlay=true)

up60on = input(true, title="60 Minute Opening Range High")
down60on = input(true, title="60 Minute Opening Range Low")
res = input('60', type=resolution, title=" length/time Of Opening Range?")

sessToUse='0930-1600'
bartimeSess = time('D', sessToUse)
fr2to17 = time(period, sessToUse)

is_newbar(res) => change(time(res, sessToUse)) != 0 
adopt(r, s) => security(tickerid, r, s) 

high_range = valuewhen(is_newbar('D'),high,0)
low_range = valuewhen(is_newbar('D'),low,0)

highColor =time ("1", sessToUse)?yellow:na 
lowColor =time ("1", sessToUse)?yellow:na 

up = plot((fr2to17>0 and up60on) ? adopt(res, high_range): na, color = highColor, style=circles, linewidth=2) 
down = plot((fr2to17>0 and down60on) ? adopt(res, low_range): na, color = lowColor, style=circles, linewidth=2) 

fill(up, down, color = white, transp=85)