traderstu22

TS2_OpeningRange_IB_V1

86 0 14
Nothing no one has done before, just customized for my desires. Chris Moody inspired for certain.
Remove from Favorite Scripts Add to Favorite Scripts
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)
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