Trading hours zone

118 0 4
Remove from Favorite Scripts Add to Favorite Scripts
// Joel Sigala 
// If you use this code in its original/modified form, do drop me a note. 

study(title="Trading hours background highlight UTC based", shorttitle="Trading hours", overlay=true)
timeinrange(res, sess) => time(res, sess) != 0

showUS = input(defval=true, type = bool, title="NY Session On")
tradeHoursUS = input(title="Trade hours US", type=session, defval="1330-2100")
sessionUS = lime

showAsia = input(defval=true, type = bool, title="Asia Session On")
tradeHoursAsia= input(title="Trade hours Asia", type=session, defval="1330-2100")
sessionAsia = lime

showAustralia = input(defval=true, type = bool, title="Sydney Session On")
tradeHoursAustralia = input(title="Trade hours Sydney", type=session, defval="1330-2100")
sessionAustralia = lime

showfrankfurt = input(defval=true, type = bool, title="Berlin Session On")
tradeHoursfrankfurt = input(title="Trade hours Berlin", type=session, defval="1330-2100")
sessionfrankfurt = lime

showEU = input(defval=true, type = bool, title="Euro Session On")
tradeHoursEU = input(title="Trade hours Europe", type=session, defval="0800-1630")
sessionEU = navy

bgcolor(showUS and timeinrange(period, tradeHoursUS) ? sessionUS : na, transp=95)
bgcolor(showAsia and timeinrange(period, tradeHoursAsia) ? sessionAsia : na, transp=95)
bgcolor(showAustralia and timeinrange(period, tradeHoursAustralia) ? sessionAustralia : na, transp=95)
bgcolor(showfrankfurt and timeinrange(period, tradeHoursfrankfurt) ? sessionfrankfurt : na, transp=95)
bgcolor(showEU and timeinrange(period, tradeHoursEU) ? sessionEU : na, transp=95)
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out