RicardoSantos

[RS]Session Open Price Levels V0

EXPERIMENTAL: theres some issues, like not being able to read sidney's open bar on the start of the week, so use this cautiously :p
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
study(title="[RS]Session Open Price Levels V0", shorttitle="[RS]SOPL.V0", overlay=true)
sidney_hours = "1700-0300", sidney_open = "1600-1601"
tokyo_hours = "1900-0400", tokyo_open = "1800-1801"
london_hours = "0300-1200", london_open = "0200-0201"
newyork_hours = "0800-1700", newyork_open = "0700-0701"

sidneyprice = time("1", sidney_open) ? open : time("1", sidney_hours) ? sidneyprice[1] : na
tokyoprice = time("1", tokyo_open) ? open : time("1", tokyo_hours) ? tokyoprice[1] : na
londonprice = time("1", london_open) ? open : time("1", london_hours) ? londonprice[1] : na
newyorkprice = time("1", newyork_open) ? open : time("1", newyork_hours) ? newyorkprice[1] : na

sidneycolor = time("1", sidney_hours) ? black : na
tokyocolor = time("1", tokyo_hours) ? teal : na
londoncolor = time("1", london_hours) ? blue : na
newyorkcolor = time("1", newyork_hours) ? navy : na

plot(sidneyprice, color=sidneycolor, linewidth=2)
plot(tokyoprice, color=tokyocolor, linewidth=2)
plot(londonprice, color=londoncolor, linewidth=2)
plot(newyorkprice, color=newyorkcolor, linewidth=2)