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

RE: Floating Point Numerical Overload



PureBytes Links

Trading Reference Links

.....and the answer is....(drum roll please).....
XAverage, a protected function, was not coded correctly to be a series
function.

TS2000i bug # 45,831.

> -----Original Message-----
> From: Gene Pope [mailto:gene@xxxxxxxxxxxxx]
> Sent: Monday, October 07, 2002 12:58 AM
> To: Mark Jurik; omega-list@xxxxxxxxxx
> Subject: Re: Floating Point Numerical Overload
>
>
> Understood Mark, thank you.
>
> Should we then assume that TS can not handle certain values for Value1
> because of this convergence? You would think it would not be a problem,
> because of the simplicity of the Xaverage function.
>
> Or perhaps TS is simply choking on calling a series function against a
> series variable that is evaluated for the first time earlier on the same
> line or on a subsequent line?? I did try to manually set the
> MaxBarsBack for
> the indicator without success.
>
> Very odd.
>
> Regards,
>
> Gene
> P.S. - I was able to work around this by simply coding the
> Xaverage function
> in "long hand", but I'm just curious, since it could affect future code.
>
>
> ----- Original Message -----
> From: "Mark Jurik" <mark@xxxxxxxxxxxx>
> To: <omega-list@xxxxxxxxxx>
> Sent: Sunday, October 06, 2002 11:40 PM
> Subject: RE: Floating Point Numerical Overload
>
>
> > >>Is there a reason why Bob's version didn't work either? (Substituting
> MyAve
> > for Value2 in the Xaverage)<<
> >
> > Bob's version was equivalent to your original code. The formula ...
> >
> > > Value1 = Average(Price,Len);
> > > Value2 = Xaverage(MyAvg,Len);
> > > MyAve  = Value1 - Value2;
> >
> > can be simplified to ...
> >
> > > Value1 = Average(Price,Len);
> > > MyAve  = Value1 - Xaverage(MyAvg,Len);
> >
> > If we assume that Value1 is a constant value C, then we can assume MyAve
> will converge to a constant value, thereby making MyAve equal to
> XMA(MyAve),
> >
> > thus ...
> >
> >         MyAve = C - XMA(MyAve)
> >         MyAve = C - MyAve
> >         MyAve = C/2
> >
> > So MyAve will tend toward converging to half of C, or half of Value1.
> >
> > - mark
> >
> >
> >
> >
> > ----------
> > From: Gene Pope
> > Sent: Sunday, October 06, 2002 9:04 PM
> > To: Mark Jurik; omega-list@xxxxxxxxxx
> > Subject: Re: Floating Point Numerical Overload
> >
> > You're correct Mark, my mistyping.
> >
> > Substitute Value1 for Value2 in the Xaverage.
> >
> > Is there a reason why Bob's version didn't work either? (Substituting
> MyAve
> > for Value2 in the Xaverage)
> >
> > Best regards,
> >
> > Gene
> >
> > ----- Original Message -----
> > From: "Mark Jurik" <mark@xxxxxxxxxxxx>
> > To: <omega-list@xxxxxxxxxx>
> > Sent: Sunday, October 06, 2002 10:42 PM
> > Subject: RE: Floating Point Numerical Overload
> >
> >
> > > >>. what turned out working was the following:
> > >
> > > Value1 = Average(Price,Len);
> > > Value2 = Xaverage(Value2,len);
> > > MyAve = Value1 - Value2;
> > >
> > > ------------------------------
> > >
> > > Nothing appears to be driving VALUE2.
> > >
> > > - mark
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>