Nothing no one has done before, just customized for my desires. Chris Moody inspired for certain.
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)