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

Re: Math Error TS 2000


  • To: omega-list@xxxxxxxxxx
  • Subject: Re: Math Error TS 2000
  • From: Rich Estrem <estrem@xxxxxxxxxxxxx>
  • Date: Wed, 11 Aug 1999 09:15:09 -0700
  • In-reply-to: <19990810123822.26163.rocketmail@xxxxxxxxxxxxxxxxxxxxx>

PureBytes Links

Trading Reference Links

Value6 is not "mathematically identical" to value7 in most cases
in your code below. I believe the error is not in TS, but in
your logic. I suggest you print out values 1-3 and do the math
by hand.


At 11:04 AM 8/11/99 -0400, you wrote:
>{This is a simplified example of the "Math error" I reported in TS 2000.
>Applied to $NDX (BMI) I get quite different results for value6 and value7
>below,
>yet mathematically they are identical.   It does not appear to be due to
>Easy Language's restriction of only 6 or 7 significant digits for variables.
>
>Upticks, DownTicks and Volume for $NDX usually do not exceed 10 so my
>indicator uses
>simple integer arithmetic, where the integers don't usually exceed 10.
>
>This is not my actual indicator, but a simplified example.
>I set MaxBarsBack to 12}
>
>
>if CurrentBar = 1 then value99 = MaxBarsBack-1;
>value1 = UpTicks;
>value2 = DownTicks;
>value3 = Volume;
>
>value4 = value1*value3;
>value5 = value2*value3;
>
>value6 = 0;
>For value0 = 0 to value99 begin
>   value6 = value6 + value4[value0]-value5[value0];
>   value7 = value6 + value3[value0]*(value1[value0]-value2[value0]);
>end;
>Print(value6," ",value7);