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

[EquisMetaStock Group] Weirdness in formula



PureBytes Links

Trading Reference Links

Hello,

I have a custom formula, and one of its line is as follow:
varA:= IF(H=L,0,Abs(O-C)/(H-L));

Basically, I want to make sure that there is a difference between 
High and Low on a given period before performing the calculation.

My problem is that "Abs(O-C)/(H-L)" seems to get evaluated, even if 
H=L.

If H=L, the final result will be accurate, *BUT* I will still get 
the "division by zero" error when opening the chart.

Is there a workaround for this?  Maybe a way to "tell" MetaStock to 
not look at a piece of code that does not match a condition?

Thanks!
Martin



 
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/