Discussions
»
Product and Service Development
»
Formula Assistance
»
Need to Plot previous 4 days HH and LL on Intraday 5 minutes chart
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/23/2009(UTC) Posts: 13
|
It was easy to plot the HH and LL value of past 4 days on EOD (Daily)Charts. :-)
How to plot the value on intrday chart???
Any direct help or pointers shall be welcome!!
Regards.
R K Karnani
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi RK
This code should work for any periodicity from tick to daily.
D:=DayOfMonth(); D:=D<>ValueWhen(2,1,D);
A:=LastValue(Cum(D))-Cum(D); A:=A<5 AND A>0;
H4:=ValueWhen(1,A,HighestSince(1,Ref(A=0,-1),H));
L4:=ValueWhen(1,A,LowestSince(1,Ref(A=0,-1),L));
H4; L4;
Use LastValue() with both outputs if you just want a horizintal line for each plot.
Roy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/23/2009(UTC) Posts: 13
|
Thanks Roy for your effort!!! Seems I could not specify properly whatI needed!!!
With the following Indicator I am able to plot previous days high low continously in my chart :
Previous Day's High/Low - On Ontraday Data
MktStart:=DayOfWeek()<>Ref(DayOfWeek(),-1); yestHi:= Ref(HighestSince(1,MktStart,H),-1); yestLo:= Ref(LowestSince(1,MktStart,L),-1); ValueWhen(1,MktStart,yestLo); ValueWhen(1,MktStart,yestHi);
The formuls was courtsey :
http://purebytes.com/archives/metastock/
I need a similar plot but the Values should be HH and LL of past N periods!!
Your formula is doing almost what i want but only on the last day displayed. Can it be done on all days, so that historical analysis becomes easier!!!
Any method to post the image of my charts here, that would have helped me explain a bit better.
Thanks again for your effort.
Regards.
-R K Karnani
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/23/2009(UTC) Posts: 13
|
Thanks for ur help!! Your code will suffice for my research!!!
Best regards
-R K Karnani
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Need to Plot previous 4 days HH and LL on Intraday 5 minutes chart
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.