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

[EquisMetaStock Group] Re: ROC formula



PureBytes Links

Trading Reference Links

mc,

Went back and reviewed your formula...something didn't seem right.

Below is a corrected version of your indicator and two more using the 
Metastock Users guidelines.


MS Users Manual:
The following formula calculates the 12-period Price Rate-Of-Change:
(( C - ref(C,-12)) / ref(C,-12)) * 100
The 12-period rate-of-change can also be written using the roc() 
function shown below:
roc( close, 12, % )
The 12-period rate-of-change can be expressed in "points" using the 
following formula:
close - ref(close, -12)


Panther ROC Points {corrected}
a:=Mov(C,9,S);
b:=Mov(C,21,S);
wh:=ValueWhen(1,Cross(a,b),C);
If(a>=b,C/wh-1,0)*100


Panther ROC Percentage
a:=Mov(C,9,S);
b:=Mov(C,21,S);
wh:=ValueWhen(1,Cross(a,b),C);
If(a>=b,((C-wh)/wh)*100,0)


Panther ROC Points
a:=Mov(C,9,S);
b:=Mov(C,21,S);
wh:=ValueWhen(1,Cross(a,b),C);
If(a>=b,C-wh,0)


Again thanks for your help with this! I'm sure Yahya will find them 
useful.

Preston

 

--- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxx> wrote:
>
> mc,
> 
> Kudos for thinking outside of the box!
> 
> The values for the two indicators are different but this is still 
an 
> approach that could be used.
> 
> Thanks for submitting it.
> 
> Preston
> 
>  
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "p_panther_73" <mchantzi@> 
> wrote:
> >
> > Well, there seems to be another way:
> > 
> > Try this one:
> > 
> > a:=Mov(C,9,S);
> > b:=Mov(C,21,S);
> > wh:=ValueWhen(1,Cross(a,b),C);
> > If(a>=b,C/wh-1,0)
> > 
> > Regards,
> > 
> > mc
> > 
> > --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@> wrote:
> > >
> > > Yahya,
> > > 
> > > Your formula would require a variable lookback period for the 
> ROC. 
> > > The only way to accomplish this would be to use a variable DLL 
of 
> the 
> > > ROC.
> > > 
> > > There is one in our files section that you could use. 
> > > Your formula would look like this:
> > > 
> > > a:=Mov(C,9,S);
> > > b:=Mov(C,21,S);
> > > x:=If(a>=b,1,0);
> > > y:= BarsSince(x<1);
> > > ExtFml("Forum.ROC",C,y,0)
> > > 
> > > 
> > > Hope this helps,
> > > 
> > > Preston
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --- In equismetastock@xxxxxxxxxxxxxxx, Yahya Kemal Beler 
> > > <yahyakemalbeler@> wrote:
> > > >
> > > > Hi,
> > > > 
> > > > I want to develop a formula like this:
> > > > 
> > > > a:=Mov(C,9,S);
> > > > b:=Mov(C,21,S);
> > > > x:=If(a>=b,1,0);
> > > > y:= BarsSince(x<1);
> > > > 
> > > > ROC(c,y,%)
> > > > 
> > > > But how?
> > > > 
> > > > Thanks
> > > >
> > >
> >
>



------------------------------------

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/