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.
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")