Hello everyone, can someone help me to code to draw a Vertical Line et midnight New york Time?
Thank you
i found a code in Tradingview if it can help
study("New York Midnight", overlay=true, scale=scale.none)
cond = time(timeframe.period, "0000-0001")
cond_1 = time('240', "0000-0000:1") and timeframe.period=="240"
plot(cond_1 ? 10e20 : na, style=plot.style_histogram)
plot(cond ? 10e20 : na, style=plot.style_histogram)
There you go (EU is UTC+2, NY is UTC-4, it’s a 6-hour difference):
IF (OpenTime = 060000) OR ((OpenTime > 060000) AND (OpenTime[1] < 060000)) THEN
DrawVline(BarIndex)
ENDIF
RETURN