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

[Metastockusers] monthly SMA



PureBytes Links

Trading Reference Links

===================
SMA Close - monthly
===================
---8<------------------------

{ Monthly Close Simple Moving Average v1 }
{ Plot on daily/weekly charts }
{ ©Copyright 2004 Jose Silva }
{ http://users.bigpond.com/prominex/pegasus.htm }

pds:=Input("monthly SMA periods",1,520,3); 
shift:=1+Input("EMA vertical shift %",
 -100,100,0)/100;
plot:=Input("EMA=1, Crossover signals=2",1,2,1);

NuMth:=Month()<>ValueWhen(2,1,Month());
MthCl:=ValueWhen(1,NuMth,ValueWhen(2,1,C));
z:=Cum(NuMth*MthCl);
MthSma:=(z-ValueWhen(pds+1,NuMth,z))/pds;
MthSma:=MthSma*shift;
signals:=Cross(C,MthSma)+-Cross(MthSma,C);

If(plot=2,signals,MthSma)

---8<------------------------

jose '-)



--- In Metastockusers@xxxxxxxxxxxxxxx, karile <karile@xxxx> wrote:
> Hi,
> 
> What I would like to do is to use a Monthly SMA on a Weekly chart.
> 
> I know that Roy Larsen has done a wonderful job about time 
compression 
> code but I am not sure it dealt with monthly to weekly chart.
> 
> Could anyone help me ?
> 
> Thanks in advance,
> 
> Regards,
> 
> Karile



------------------------ 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/zMEolB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

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

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

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