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

Re: Floating point error in SuperCharts


  • To: Omega Mailing List <omega-list@xxxxxxxxxx>
  • Subject: Re: Floating point error in SuperCharts
  • From: Scientific Approaches <sci@xxxxxxxxxx>
  • Date: Sat, 7 Mar 1998 13:14:09 -0800 (PST)

PureBytes Links

Trading Reference Links

Earl Adamy wrote:

> Based upon experience using SC across 3 full versions and
> many years of programming experience, I've come to conclusion
> that Divide By Zero and/or Overflow messages are not only used
> for DBZ/Overflow errors, but are used in lieu of proper error
> handling of non-DBZ/Overflow errors.
> 
> I don't remembe the details but I do remember getting both
> overflow and divide by zero errors on perfectly good data using
> Omega's own functions and studies.  I'm faced with an excellent
> example right now. I have a user defined function which provides
> trading signals. For testing purposes, I created an indicator
> which calls the function using a series of inputs as arguments.
> I used the indicator for well over a week through various
> iterations of the function on the same data setup and never had
> a problem not of my own making. When I had completed verifying
> the signals, I created a system and literally copied the function
> call from the indicator to the system. I added the system to the
> same chart which contains the indicator expecting to see trading
> signals. Instead I get a divide by zero error!

That probably is due to the different Easy Language MaxBarsBack processing
in user trading indicator and system programs.  An arithmetic overflow
probably is occurring on the first price bar in the trading system program. 
Put a MaxBarsBack conditional test at the beginning of that program and I
will be surprised if the error doesn't disappear.

  -Bob Brickey
   Scientific Approaches
   sci@xxxxxxxxxx