PureBytes Links
Trading Reference Links
|
thanks roy, actually i found it out by myself, forgot
to send it to the group......i was pulling my hairs
looking for something like "timeofday()" in the
glossary until i thought about "hour()" ;)
--- Roy Larsen <rlarsen@xxxxxxxxxxxxxx> wrote:
> le corbeaux masque
>
> > i'm trying to modify roy's weekly vompression code
> to
> > show daily indicators on 60m chart, but i can't
> find
> > any equivalent of the "dayofweek()" functoin for
> > intraday purpose,
> >
> > is this compression possible ?
> > what function would you use ?
>
> Wouldn't "Hour()" be the proper function to use. You
> would set 'F' to the
> normal last hourly bar for your market.
>
> M:=Hour()<ValueWhen(2,1,Hour());
> F:=Hour()=16;
>
> Here's the code with only those lines and some
> comments changed. The 'M' and
> 'F' variables are the only ones that should need
> changing to adapt to
> different charts. 'F' must define the normal last
> bar of the required frame
> and 'M' must define the first bar for every frame.
>
> Hope this helps.
>
> Roy
>
> {daily OHLCV Compression}
> {© 2003 Roy Larsen}
> {rlarsen@xxxxxxxxxxxxxx}
> {use on hourly charts}
> X:=Input("1=Open 2=High 3=Low 4=Close
> 5=Volume",1,5,4);
> Q:=Input("1=Dynamic Current Day",0,1,1);
> {0=update at end of day for normal trading session}
> {1=dynamic current day - MS compatible}
> M:=Hour()<ValueWhen(2,1,Hour());
> F:=DayOfWeek()=16;
> B:=LastValue(Cum(1))=Cum(1);
> J:=If(F,1,If(Alert(F,2)=0 AND M,2,0));
> J:=If(B+(J=0)+Q=3,1,J);
> Hw:=HighestSince(1,M,H);
> Hw:=ValueWhen(1,J,If(J=1,Hw,ValueWhen(2,1,Hw)));
> Lw:=LowestSince(1,M,L);
> Lw:=ValueWhen(1,J,If(J=1,Lw,ValueWhen(2,1,Lw)));
> K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2,1,C)));
> Ow:=ValueWhen(1,J,If(J=1,ValueWhen(1,M,O),
> ValueWhen(2,M OR Cum(1)=2,O)));
> Z:=If(M,V/1000,PREV+(V/1000)); Z:=Int(Z);
> Z:=ValueWhen(1,J,If(J=1,Z,ValueWhen(2,1,Z)));
> X:=If(X=1,Ow,If(X=2,Hw,If(X=3,Lw,If(X=5,Z,K))));
> F:=LastValue(Cum(1))-Cum(1);
> G:=LastValue(Cum(J>0))-Cum(J>0);
> I:=1+F-G;
> N:=LastValue(Cum(J>0));
> I:=ValueWhen(2,F<=N,1)*I;
> ValueWhen(LastValue(I-PREV+PREV),J,X);
>
>
>
>
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/mk9osC/hP.FAA/3jkFAA/zMEolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|