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

Re: [EquisMetaStock Group] Weirdness in formula



PureBytes Links

Trading Reference Links




You can give an If() Boolean condition before the 
formula is evaluated. But the division by zero error will come up even 
if the result is not used in your main math.
DusantChief Architect<A 
href="">http://www.candlestrength.com/
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=mlaporte99@xxxxxxxxx 
  href="">mlaporte99 
  To: <A 
  title=equismetastock@xxxxxxxxxxxxxxx 
  href="">equismetastock@xxxxxxxxxxxxxxx 
  
  Sent: Saturday, March 06, 2004 8:41 
  AM
  Subject: [EquisMetaStock Group] Weirdness 
  in formula
  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:     <A 
  href="">http://groups.yahoo.com/group/equismetastock/<*> 
  To unsubscribe from this group, send an email to:     
  <A 
  href="">equismetastock-unsubscribe@xxxxxxxxxxxxxxx<*> 
  Your use of Yahoo! Groups is subject to:     <A 
  href="">http://docs.yahoo.com/info/terms/ 







Yahoo! Groups Sponsor


ADVERTISEMENT




Click Here















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.