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

[EquisMetaStock Group] Re: Division error



PureBytes Links

Trading Reference Links


Preston, try this code:

---8<--------------------
ZZ:=Zig(C,17,%);
X:=BarsSince(ZZ<Ref(ZZ,-1)
 AND Ref(ZZ,-1)>Ref(ZZ,-2));
X1:=LastValue(X)+1; {flag duration}
X2:=X1+1;
SD:=Stdev(C,X2);

denominator:=Ref(V,-X2);
noZero:=If(denominator=0,0.00001,denominator);

Ref(LinRegSlope(V,X2)/noZero,-1)*100<-2
---8<--------------------


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




--- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxxx> wrote:
> 
> All,
> 
> I've been working on a TASC article that Markos Katsanos wrote. His 
> code has a division error in it. Here's the code. The last line is
> the problem. I was trying it on PTC and got the error.
> 
> ZZ:=Zig(C,17,%);
> X:=BarsSince(ZZ < Ref(ZZ,-1) AND Ref(ZZ,-1) > Ref(ZZ,-2));
> X1:=LastValue(X)+1; {flag duration}
> X2:=X1+1;
> SD:=Stdev(C,X2);
> 
> Ref(LinRegSlope(V,X2)/Ref(V,-X2),-1)*100<-2
> 
> Any ideas?
> 
> Preston





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
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/