[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Metastockusers] Daily High & Low plot



PureBytes Links

Trading Reference Links

> Does anyone have a formula to plot the previous daily Hi and Lo on an
> intra day chart. Any advice will be greatly appreciated.


If you want the daily value to dispaly on the last bar of each day you will need to define the last
bar, variable 'F'.

Roy

  {Daily OHLC}
  {Copyright© 2003 Roy Larsen}
  {rlarsen@xxxxxxxxxxxxxx}
  {use on intraday charts}
  {set 'F' to signal last bar of day}
Q:=Input("Dynamic Current Day?",0,1,1);
 {0=Update when end of current day is known}
 {1=MS compatible dynamic current day}
M:=DayOfMonth()<>ValueWhen(2,1,DayOfMonth());
F:=0;{Hour()=hh AND Minute()=mm}
A:=LastValue(Cum(1)-1)=Cum(1);
B:=LastValue(Cum(1))=Cum(1);
J:=If(F,1,If(Alert(F,2)=0 AND M,2,0));
J:=If(A+LastValue(J)>2 OR B+Q>1,1,(B=0)*J);
Hd:=HighestSince(1,M,H);
Hd:=ValueWhen(1,J,If(J=1,Hd,ValueWhen(2,1,Hd)));
Ld:=LowestSince(1,M,L);
Ld:=ValueWhen(1,J,If(J=1,Ld,ValueWhen(2,1,Ld)));
Cd:=ValueWhen(1,J,If(J=1,C,ValueWhen(2,1,C)));
Od:=ValueWhen(1,J,If(J=1,ValueWhen(1,M,O),
  ValueWhen(2,M OR Cum(1)=2,O)));
Od:=ValueWhen(1,Ld>0,Od); {O}
Hd:=ValueWhen(1,Ld>0,Hd); {H}
Ld:=ValueWhen(1,Ld>0,Ld); {L}
Cd:=ValueWhen(1,Ld>0,Cd); {C}
{Od;} Hd; Ld; {Cd;}



 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/Metastockusers/

To unsubscribe from this group, send an email to:
 Metastockusers-unsubscribe@xxxxxxxxxxxxxxx

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/