Current Week High and Low
Forums › ProRealTime English forum › ProBuilder support › Current Week High and Low
- This topic has 8 replies, 3 voices, and was last updated 4 years ago by RiaanvN.
-
-
04/27/2020 at 11:37 AM #128393
Hi, I’m rubbish at coding. Please help with indicator?
- Vertical line at Monday at 12am, signaling start of new week, accessible on all time frames.
- Current week high and week low horizontal lines. Preferably accessible on all time frames, otherwise specific to 15 minutes and 1 hour.
Thanks.
04/27/2020 at 11:41 AM #128394This indicator will do your second request.
EDIT: I just reread your question. This indicator actually does the last closed weeks levels are you wanting the current still forming weeks high and low?
04/27/2020 at 11:44 AM #12839504/27/2020 at 11:50 AM #12839704/27/2020 at 11:54 AM #128398This should do what you want:
12345678910111213if opentime = 000000 and opendayofweek = 1 thendrawvline(barindex)endifif opendayofweek < opendayofweek[1] thenhh=highll=lowendifhh = max(hh,high)ll = min(ll,low)return hh as "This weeks high", ll as "This weeks low"1 user thanked author for this post.
04/27/2020 at 11:55 AM #128399Shouldn’t 12am be written as 000000?
12pm is 120000.
Well spotted Roberto – I really shouldn’t scan read questions in a hurry to get to my cheese and tomato sandwich!
1 user thanked author for this post.
04/28/2020 at 9:08 AM #12855604/28/2020 at 9:27 AM #128559That’s a bit tricky because we can’t delete drawn objects so the only way we can do that is to wait till the end of the week and then draw it which is not going to be any use during the week!
It would be possible to just have it as two horizontal lines that move up and down though.
In v11 it might be possible to create something using arrays that could do it but it would be quite a lot of work.
04/28/2020 at 1:37 PM #128622 -
AuthorPosts
Find exclusive trading pro-tools on