OPEN-SOURCE SCRIPT
Tokyo & London Pre-Market Boxes (Local Time)

//version=5
indicator("Daily 10am & 6pm Lines", overlay=true)
var line line10 = na
var line line18 = na
// Convert 10:00 and 18:00 into timestamps for today
t10 = timestamp(year, month, dayofmonth, 10, 0)
t18 = timestamp(year, month, dayofmonth, 18, 0)
// When the bar’s time crosses 10:00, draw a vertical line
if (time >= t10 and time[1] < t10)
line10 := line.new(x1 = t10, y1 = low, x2 = t10, y2 = high, color=color.blue, width = 1)
// When the bar’s time crosses 18:00 (6pm), draw another line
if (time >= t18 and time[1] < t18)
line18 := line.new(x1 = t18, y1 = low, x2 = t18, y2 = high, color=color.red, width = 1)
indicator("Daily 10am & 6pm Lines", overlay=true)
var line line10 = na
var line line18 = na
// Convert 10:00 and 18:00 into timestamps for today
t10 = timestamp(year, month, dayofmonth, 10, 0)
t18 = timestamp(year, month, dayofmonth, 18, 0)
// When the bar’s time crosses 10:00, draw a vertical line
if (time >= t10 and time[1] < t10)
line10 := line.new(x1 = t10, y1 = low, x2 = t10, y2 = high, color=color.blue, width = 1)
// When the bar’s time crosses 18:00 (6pm), draw another line
if (time >= t18 and time[1] < t18)
line18 := line.new(x1 = t18, y1 = low, x2 = t18, y2 = high, color=color.red, width = 1)
Skrip open-source
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Pernyataan Penyangkalan
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Skrip open-source
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Pernyataan Penyangkalan
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.