The error has to do with each instance
when HHV(H,NumPeriods) – C equals
zero.
The way to fix it is to change the code to
Divider:= Max(HHV(H,NumPeriods) – C,0.0001);
((HHV(H,NumPeriods) - LLV(L,NumPeriods))/Divider);
The only issue with the above is that dividing by a very
small number gives a very large number as a result.
So if this is an issue to your calculations the alternate can
be:
Divider:= If(HHV(H,NumPeriods) – C > 0,
HHV(H,NumPeriods) – C,1);
((HHV(H,NumPeriods) - LLV(L,NumPeriods))/Divider);
Regards,
Tim.
From:
equismetastock@xxxxxxxxxxxxxxx [mailto:equismetastock@xxxxxxxxxxxxxxx] On Behalf Of formulaprimer
Sent: Sunday, 18 September 2005
13:08
To: equismetastock@xxxxxxxxxxxxxxx
Subject: [EquisMetaStock Group]
Zero Error Problem
NumPeriods:=
Input("Enter the number of periods:",3,50,14);
((HHV(H,NumPeriods) -
LLV(L,NumPeriods))/(HHV(H,NumPeriods) - C));
I'm getting a zero error for the above formula. I
forgot the trick to
fix this. Can someone remind me thanks.
SPONSORED LINKS
YAHOO! GROUPS LINKS