traderstu22

TS2_Intraday_Times

41
Added warning time slots
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?
//Created By ChrisMoody on 9-14-2014 To plot Background Highlights for Recurring Times
//Edited by TS2 with static time frame inspirations from TraderMentatlity: http://www.tradermentality.com/2016/02/intraday-reversal-times.html
// added prewarning time slots, cause sometimes, you want to know when the reversal might be coming

study(title="TS2_Intraday_Times", shorttitle="TS2_Intraday_Times",overlay=true)

use0 = input(true, title="Show 9:30-9:35")
use1 = input(true, title="Show 9:50-10:10")
use2 = input(true, title="Show 10:25-10:35")
use3 = input(true, title="Show 11:15")
use4 = input(true, title="Show 12:00")
use5 = input(true, title="Show 12:45")
use6 = input(true, title="Show 1:30")
use7 = input(true, title="Show 2:15")
use8 = input(true, title="Show 3:00")
use9 = input(true, title="Show 3:30")

useP = input(true, title="Show prewarning?")

sess0 = '0930-0935'
sess1 = '0950-1010'
sess2p = '1020-1025'
sess2 = '1025-1035'
sess3p = '1110-1111'
sess3 = '1115-1116'
sess4p = '1155-1156'
sess4 = '1200-1201'
sess5p = '1240-1241'
sess5 = '1245-1246'
sess6p = '1325-1326'
sess6 = '1330-1331'
sess7p = '1410-1411'
sess7 = '1415-1416'
sess8p = '1455-1456'
sess8 = '1500-1501'
sess9p = '1525-1526'
sess9 = '1530-1531'

bgPlot0 = time(period, sess0)
bgPlot1 = time(period, sess1)
bgPlot2 = time(period, sess2)
bgPlot3p = time(period, sess3p)
bgPlot3 = time(period, sess3)
bgPlot4p = time(period, sess4p)
bgPlot4 = time(period, sess4)
bgPlot5p = time(period, sess5p)
bgPlot5 = time(period, sess5)
bgPlot6p = time(period, sess6p)
bgPlot6 = time(period, sess6)
bgPlot7p = time(period, sess7p)
bgPlot7 = time(period, sess7)
bgPlot8p = time(period, sess8p)
bgPlot8 = time(period, sess8)
bgPlot9p = time(period, sess9p)
bgPlot9 = time(period, sess9)

bgcolor(use0 and bgPlot0 > 0 ? yellow : na, transp=75)
bgcolor(use1 and bgPlot1 > 0 ? yellow : na, transp=75)
bgcolor(use2 and bgPlot2 > 0 ? yellow : na, transp=75)
bgcolor(use3 and bgPlot3p and useP > 0 ? blue : na, transp=75)
bgcolor(use3 and bgPlot3 > 0 ? yellow : na, transp=75)
bgcolor(use4 and bgPlot4p and useP > 0 ? blue : na, transp=75)
bgcolor(use4 and bgPlot4 > 0 ? yellow : na, transp=75)
bgcolor(use5 and bgPlot5p and useP > 0 ? blue : na, transp=75)
bgcolor(use5 and bgPlot5 > 0 ? yellow : na, transp=75)
bgcolor(use6 and bgPlot6p and useP > 0 ? blue : na, transp=75)
bgcolor(use6 and bgPlot6 > 0 ? yellow : na, transp=75)
bgcolor(use7 and bgPlot7p and useP > 0 ? blue : na, transp=75)
bgcolor(use7 and bgPlot7 > 0 ? yellow : na, transp=75)
bgcolor(use8 and bgPlot8p and useP > 0 ? blue : na, transp=75)
bgcolor(use8 and bgPlot8 > 0 ? yellow : na, transp=75)
bgcolor(use9 and bgPlot9p and useP > 0 ? blue : na, transp=75)
bgcolor(use9 and bgPlot9 > 0 ? yellow : na, transp=75)