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

[EquisMetaStock Group] Re: Triple Momentum Level of ROCs



PureBytes Links

Trading Reference Links

Bill, I don't know Gerald Appel's formula, but this is how I would do 
it:

===========
RoC of MACD
===========
---8<------------------------------

{ RoC of MACD-type indicator - v1.0

 ©Copyright 2006 Jose Silva.
  The grant of this license is for personal use
   only - no resale or repackaging allowed.
  All code remains the property of Jose Silva.
  http://www.metastocktools.com }

{ User inputs }
pds1:=Input("Periods 1",1,260,25);
pds2:=Input("Periods 2",1,260,15);
pds3:=Input("Periods 3",1,260,5);
norm:=Input("Normalize?  [1]Yes,  [0]No",0,1,1);

{ RoC of MACD }
x:=-ROC(Mov(C,pds1,E)/Mov(C,pds2,E),pds3,$);

{ Normalize }
y:=(x-Lowest(x))
 /Max(Highest(x)-Lowest(x),.000001)*100;

{ Select Raw/Normalized RoC }
RoCmac:=If(norm,y,x);
avg:=Cum(RoCmac)/Cum(IsDefined(RoCmac));

{ Automatic OverBought/Sold levels }
pk:=Ref(RoCmac,-1)=HHV(RoCmac,3)
 AND Ref(RoCmac,-1)>avg;
pk1:=ValueWhen(1,pk,Ref(RoCmac,-1))*pk;
oBought:=Cum(pk1)/Cum(pk);
tr:=Ref(RoCmac,-1)=LLV(RoCmac,3)
 AND Ref(RoCmac,-1)<avg;
tr1:=ValueWhen(1,tr,Ref(RoCmac,-1))*tr;
oSold:=Cum(tr1)/Cum(tr);

{ Plot in own window }
oBought;avg;oSold;RoCmac

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


jose '-)
http://www.metastocktools.com




--- In equismetastock@xxxxxxxxxxxxxxx, bill rook <zipple_acre_udder@x
..> wrote:
>
> Hi
>    
>   I m trying to combine the values of roc 25 15 and 5 day (following
> Gerald Appel s formula)
>    
>   What metastock firmula would do the trick?
>    
>   Bill







 
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/