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

Re: [EquisMetaStock Group] Simple Moving Average using first bar of each week



PureBytes Links

Trading Reference Links

Hi Sam

In case there is any confusion please understand that the code shown below was designed for use on
daily charts. It is the week-by-week values plotted on a daily chart that I claim to exactly match
the MetaStock EMA Mov() values on a weekly chart. It was never intended to plot correct weekly
values on a weekly chart. What would be the point of that when the Mov() function works just fine on
any chosen periodicy. The object of the weekly EMA for daily charts is to show the EMA for the
weekly periodicy without have to switch the chart to weekly.

Feedback to rlarsen@xxxxxxxxxxxxxx from anyone who believes my indicator to be faulty would be
appreciated. I don't believe it to be flawed but if it is it certainly wouldn't be the first time
I've got it wrong.

Roy


----- Original Message ----- 
From: "sabboushi2000" <Yahoo@xxxxxxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Wednesday, February 11, 2004 5:30 AM
Subject: Re: [EquisMetaStock Group] Simple Moving Average using first bar of each week


> Thanks fo sharing, Roy-
> With Regards-
> Sam
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
> wrote:
> > Sam
> >
> > Here's my Weekly EMA of close for daily charts. In dynamic mode
> this is 100% accurate when tested
> > against an EMA on a weekly chart.
> >
> > D:=Input("Periods in Weeks",1,999,20);
> > D:=2/(1+D);
> > Q:=Input("Dynamic Current Week, Yes=1",0,1,1);
> > M:=DayOfWeek()<=ValueWhen(2,1,DayOfWeek());
> > F:=DayOfWeek()=5;
> > 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);
> > K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2,1,C)));
> > If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-D)+K*D);
> >
> > Roy
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
     equismetastock-unsubscribe@xxxxxxxxxxxxxxx

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