| 
 Good idea, MG! It works fine. Thank 
you. 
Regards. 
  
Manuel 
  
  ----- Original Message -----  
  
  
  Sent: Tuesday, April 05, 2005 6:52 
  PM 
  Subject: [EquisMetaStock Group] Re: 
  Division by 0 
  
 
  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 Links 
  |