angellance

Simple Session Seperator

179
use utc+3 timezone to match up with MT4
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

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.

Want to use this script on a chart?
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")