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

Re: [Metastockusers] week of year



PureBytes Links

Trading Reference Links

>From my own store of code here's a crude indicator to give the week for all
but the first year (which will return zero). Beware the trap of using this
indicator with explorations using less bars than that loaded with each
chart.

  {DayOf Week}
A:=DayOfWeek()<=Ref(DayOfWeek(),-1);
B:=Year()>Ref(Year(),-1);
I:=Cum(a+b>-1)=1;
F:=BarsSince(i OR a)<BarsSince(i OR b);
G:=Cum(Cross(a,0.5))-ValueWhen(1,i OR (f AND
Alert(f=0,2)) OR (f=0 AND
Alert(f,2)),Cum(Cross(a,0.5)));
J:=If(f,g+1,g)+1;
If(Year()=ValueWhen(1,Cum(1)=1,Year()),0,J);

Roy


----- Original Message -----
From: "Roy Larsen" <rlarsen@xxxxxxxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Thursday, November 21, 2002 7:18 PM
Subject: Re: [Metastockusers] week of year


> > is there a possibility to create an indicator similar to dayofweek
> > for the weeks, i.e. weekoftheyear() ?
>
> Yes it's been done, though the code I've seen has not been made public so
> I'm not at liberty to pass it on.
>
> Roy
>
>
>
> 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/
>
>
>
>



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/