angellance

Simple Session Seperator

179
use utc+3 timezone to match up with MT4
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
study(title="Simple Session Seperator", shorttitle="Simple Session Seperator by Angel Lance", overlay=true)
//use UTC+3 Athens Timezone to match up with metatrader4

timeinrange(res, sess) => time(res, sess) != 0
    
render = input(false,title="Slow but exact background (Refresh page)")
renderRes = render ? "1" : "5"

//Asian
asianSession = "1900-0315" 
asianColor = red
asian = input(true)
bgcolor(asian and timeinrange(renderRes, asianSession) ? asianColor : na, transp=80, title="Asian Session")


//London
londonSession = "0000-0915"
londonColor = blue
london = input(true)
bgcolor(london and timeinrange(renderRes, londonSession) ? londonColor : na, transp=80, title="London Session")


//New York
newyorkSession = "0700-1615" 
newyorkColor = green
newyork = input(true, title="New York")
bgcolor(newyork and timeinrange(renderRes, newyorkSession) ? newyorkColor : na, transp=80, title="New York Session")