PureBytes Links
Trading Reference Links
|
juzam,
I gave you this:
pds:=Input("Nth bar periodicity",1,252,5);
pdsma:=Input("Smoothing periods",1,100,21);
signal:=Mod(Cum(1),pds)=0;
Cl:=ValueWhen(1,signal,Ref(C,-1));
mov(Cl,pdsma,S){end}
It calculates every 5 days. If you want a longer period just set the
Nth bar periodicity to a longer period. If you set it at 252 you
will get approximately one year.
Preston
--- In equismetastock@xxxxxxxxxxxxxxx, juzam66666 <no_reply@xxx>
wrote:
>
> Thanks for all the help guys. I tried the nth bar sma, but it
didn't
> seem to come out quite like i was thinking. ill try to
> expand...basically what im trying to get is a seasonally-adjusted
> moving average.
>
> so the latest data point is, say, 625 on date 3/20/2007. the
moving
> average would calculate, for example, the five-year seasonally
> adjusted sma. to calculate this it would average the data points
on
> 3/20/2006, 3/20/2005, 3/20/2004, 3/20/2003, and 3/20/2002. for the
> moving average point a day earlier, on 3/19/2007 it would do the
same
> calculations for 3/19/2006, 3/19/2005, etc.
>
> note that the 625 is basically irrelevent because it isn't in the
sma
> until 3/20/2008 comes along
>
> thank you so much for any help
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Transfer from your equities account.
Receive up to $1,000 from GFT. Click here to learn more.
http://us.click.yahoo.com/aZttyC/X_xQAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|