traderstu22

TS2_OpeningRange_IB_V1

60
Nothing no one has done before, just customized for my desires. Chris Moody inspired for certain.
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?
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)