PoshTrader

Market Hours

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.
开源脚本

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

免责声明

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

想在图表上使用此脚本?
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")