PureBytes Links
Trading Reference Links
|
All variables are initialized with a default value of zero unless otherwise
specified. Thus, the use of the variable as a denominator presents a
potential divide by zero or floating point error. In order to prevent the
possibility of the error occurring you will need to condition the formula
prior to division. For example:
if x <> 0 then
y = high / x ;
Best regards,
Benjamin "ElGuru" Blanco
http://www.blancofamily.net/elguru
----- Original Message -----
From: "CRE" <cengholm@xxxxxxxxxxxx>
To: "Rich Schaaf" <rschaaf@xxxxxxxxxxxx>; <omega-list@xxxxxxxxxx>
Sent: Tuesday, July 16, 2002 3:46 PM
Subject: Re: Brain teasers (are these known TradeStation bugs?)
I've had a number of manifestations (infestations??) of this error message.
For example, a pair of EL statement such as
x=4;
y=high/x;
might give a floating point error, but changing the code to
y=high*0.25;
will clear it up. The problem only occurs intermittently and I've never
gotten a helpful answer from the TS folks. So I've just kluged my way around
it after a lot of trial and error. And yes, I've checked to make sure that
the variables have the correct type declarations.
CRE
Portland, ME
----- Original Message ----- > Problem 3:
> (TS2000i only, I think): I have an indicator whose sole function is to
> dump Date, Time, O, H, L, C, Volume to the Debug Window in the
> PowerEditor. Sometimes, when this indicator is applied to a chart,
> TS2000i complains:
> "Floating point invalid numbers in calculation. This error sometimes
> indicates a division by zero with a zero also in the numerator."
> The bizarre thing is that there are no floating point operations in the
> indicator itself -- all the indicator does is call print() with the data
> values mentioned above.
>
|