[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

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 Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/BefplB/TM
---------------------------------------------------------------------~->

 
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/