OPEN-SOURCE SCRIPT

EU Stock Market Time Zone with Vertical Lines

//version=5
indicator("EU Stock Market Time Zone with Vertical Lines", overlay=true)

// Define the start and end times of the EU stock market
euMarketOpen = timestamp("GMT+1", year, month, dayofmonth, 09, 00) // 9:00 AM CET
euMarketClose = timestamp("GMT+1", year, month, dayofmonth, 17, 30) // 5:30 PM CET

// Check if the current time is within the EU market hours
isEUmarketOpen = (time >= euMarketOpen and time <= euMarketClose)

// Draw vertical dotted lines during the EU market hours
var lineColor = color.new(color.blue, 0)
if (isEUmarketOpen and na(time[1]))
line.new(x1=na, y1=na, x2=na, y2=na, xloc=xloc.bar_time, extend=extend.both, color=lineColor, style=line.style_dotted, width=1)

// Plot a horizontal line to mark EU market hours
plot(isEUmarketOpen ? close : na, style=plot.style_linebr, color=color.blue, linewidth=2, title="EU Market Hours")
Bands and Channels

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明