Thanks for your reply. I have tried multiple variations on your code snippet, but was unhappy with the distortion on the price chart, due to the histogram referencing zero. I then realised that I don’t actually need it for live trading at all it’s actually only whilst reviewing past activity. So I opted for a tape indicator beneath my price chart.
This will serve my purpose very well until 10.3 and I thank you you for your prompt assistance.
Please find the code below
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Session Indicator
// t1 start of my shift (set variable hhmmss)
// t2 end of my shift (set variable hhmmss)
starttime=t1
endtime=t2
iftime>starttimeandtime<endtimethen
value=1
else
value=0
endif
returnvalue
I suppose if anyone had a mind to they could quite easily adjust the variables for Asia, Euro and US Time zones if required
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok