tmc

Market Hours

510 3 78
Updated indicator showing Market Hours.
  • Market Hours plot one hour ahead so you can easily see when markets open or close.
  • Works only on 1m, 3m             , 5m, 15m, 30m and 60m charts.
Remove from Favorite Scripts Add to Favorite Scripts
study(title="Market Hours", scale=scale.right, overlay=false)


//--- Europe
London = "0700-1600"
Frankfurt = "0600-1500"

//--- America
NewYork = "1200-2100"
Chicago = "1300-2200"

//--- Asia
Tokyo = "2300-0800"
HongKong = "0000-0900"

//--- Pacific
Sydney = "1900-0600"
Wellington = "1900-0500"


//-- Time In Range
timeinrange(res, sess) => time(res, sess) != 0

london = timeinrange(period, London)
frankfurt = timeinrange(period, Frankfurt)
newyork = timeinrange(period, NewYork)
chicago = timeinrange(period, Chicago)
tokyo = timeinrange(period, Tokyo)
hongkong = timeinrange(period, HongKong)
sydney = timeinrange(period, Sydney)
wellington = timeinrange(period, Wellington)


//--- Plots
shift = period=="1"?61:period=="3"?21:period=="5"?13:period=="15"?5:period=="30"?3:period=="60"?2:0

plot(8, color=london?#3fa9f5:white, linewidth=5, offset=shift, title="London")
plot(7, color=frankfurt?#3fa9f5:white, linewidth=5, offset=shift, title="Frankfurt")
plot(6, color=newyork?#ed1e79:white, linewidth=5, offset=shift, title="New York")
plot(5, color=chicago?#ed1e79:white, linewidth=5, offset=shift, title="Chicago")
plot(4, color=tokyo?#79c942:white, linewidth=5, offset=shift, title="Tokyo")
plot(3, color=hongkong?#79c942:white, linewidth=5, offset=shift, title="Hong Kong")
plot(2, color=sydney?#ff931e:white, linewidth=5, offset=shift, title="Sydney")
plot(1, color=wellington?#ff931e:white, linewidth=5, offset=shift, title="Wellington")
Looks like a script of the week to me :) Very clean and great colors.
Reply
tmc ChartArt
Thanks! :agree:
Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Screener Crypto Screener 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