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

TS7 EL Bug?



PureBytes Links

Trading Reference Links

Anyone ever run into this?

Tks,
Chris
......................................................

I have been baffled as to why an indicator is behaving incorrectly at
certain times, and have finally figured it out. There appears to be an
incompatibility between the way numbers are stored in TS7 and intportion. I
have a calculated value that is an even number on the first bar of the day.
1, 2, 3, etc. What I have determined is that the calculated value that TS
stores is not "2" but is 1.9999999999990905... OK, now apply intportion to
this variable that is supposed to be 2 and you should get 2, but you don't,
you get 1.

My calc that arrives at the even #s is not difficult, I have stepped through
it and found that the step that introduces the error is apparently adding an
expression that equals 0 to a whole integer.

OK, next I try rounding the value that is supposed to be 2 to eight decimal
places....silly me...expect to get a whole number. The result of rounding is
2.000004999999... At least it is over 2 now, so intportion works.