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

[EquisMetaStock Group] Re: every x period moving average (seasonally adjusted)



PureBytes Links

Trading Reference Links

thank you so much for all your help! i really apreciate it. just to 
clarify, though, is it not possible to create an nth bar sma without 
the stair-step look and without smoothing (as in actually 
calculating the nth bar sma for each and every point)?

on a separate but somewhat related note: is there a formula that for 
point X on a graph (say, the latest data point), it would take day
 x-5 (5 days ago), x-10, x-15, x-20, and x-25  and plot the highest 
value? or lowest value? 


This forum is a gem; I've learned a lot browsing. Thank you for all 
your time,

Adam

--- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxx> wrote:
>
> 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@> 
> 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 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/