Market Open and Close Hours indicator

Category: Indicators By: kabbel Created: May 22, 2020, 10:48 AM
May 22, 2020, 10:48 AM
Indicators
3 Comments

This indicator plots under the price chart, the start and end of sessions of the following different markets: Tokyo – London and US
Very useful to quickly know which market session we are in.

Al credits to @Vonasi

NewYorkOpen = 1530
NewYorkClose = 2200
LondonOpen = 0900
LondonClose = 1730
JapanOpen = 0200
JapanClose = 0800

nyOpen =  NewYorkOpen*100
nyClose =  NewYorkClose*100
LoOpen =  LondonOpen*100
LoClose =  LondonClose*100
JaOpen =  JapanOpen*100
JaClose =  JapanClose*100

if opentime = nyopen then
ny=1
endif
if opentime = nyclose then
ny=0
endif

if opentime = loopen then
lo=1
endif
if opentime = loclose then
lo=0
endif

if opentime = jaopen then
ja=1
endif
if opentime = jaclose then
ja=0
endif

if ny then
if not ny[1] then
drawtext("NewYork",barindex-8,2,sansserif,bold,10) coloured(0,0,0)
endif
drawtext("█",barindex,2,sansserif,bold,16) coloured(0,0,255)
endif

if lo then
if not lo[1] then
drawtext("London",barindex-7,1,sansserif,bold,10) coloured(0,0,0)
endif
drawtext("█",barindex,1,sansserif,bold,16) coloured(128,0,0)
endif

if ja then
if not ja[1] then
drawtext("Tokyo",barindex-6,3,sansserif,bold,10) coloured(0,0,0)
endif
drawtext("█",barindex,3,sansserif,bold,16) coloured(0,128,0)
endif

return 0 coloured(0,0,0,0), 4 coloured(0,0,0,0)

 

Download
Filename: Market-Open-Close-Hours-1.itf
Downloads: 241
kabbel Junior
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Logo Logo
Loading...