PureBytes Links
Trading Reference Links
|
Martin,
You can add a small value to (H-L) :
varA:= Abs(O-C)/(H-L+0.000001));
Pierre
mlaporte99 a écrit:
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 the Yahoo! Terms of Service.
|