PureBytes Links
Trading Reference Links
|
The problem with ignoring division by zero stuff, is that (in the MS I
use) it results in zeroes in the series, which you often do not want.
One way to solve this, is to add a tiny amount, so in your case,
SVolHis = Stdev(V,200) + 1;
or add
+0.001
just to make sure it is not zero.
Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com
--- In equismetastock@xxxxxxxxxxxxxxx, "manelcabedo"
<manelcabedo@xxxx> wrote:
>
>
> Hi friends,
>
> Is there any way of avoiding the boring division by zero messages in
> custom indicators?
>
> I've designed this beautiful Normalized Volume Indicator but
> (incomplete series, I suppose) gives me a lot of division by zero
> errors. Yet I think I prevent them with the Test variable, but it is
> not actually the case, it does not work. Any idea or comment?
>
> MVolHis:=Mov(V,200,S);
> SVolHis:=Stdev(V,200);
> Test:=SVolHis>0;
> VNor:=If(Test,(V-MVolHis)/SVolHis,PREV);
> VUp:=If(VNor>0,VNor,0); {blue color}
> VDn:=If(VNor<0,VNor,0); {red color}
> VUp;VDn;+1;-1
>
> Regards.
>
> Manuel
------------------------ 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/
|