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

Re: Plotting 8 digit data



PureBytes Links

Trading Reference Links

> When I plot the data, half of the data points are negative. I
> assume it's because TS4 is going bonkers after 7 digits due to
> floating point errors. 

TS4 (and probably TS2k/TS6, I'm not sure) stores values like this 
internally as 32-bit signed integers.  It then uses a scaling factor 
to multiply the integer value into the correct range.  So, for 
example, when you set the PriceScale of the ES to 1/100, you tell TS 
that it should multiply the values it receives times 100 before 
storing them, and divide by 100 when displaying them.

Chances are your PriceScale (actually Display Value, which is what 
it's called for ASCII data) was set to the default value of 1/100.  
That means the largest value TS can store is 2^31/100 = 21,474,836.48.

Adv/decl data typically has really huge numbers.  21 million isn't 
big enough.  When the value gets bigger than 21 million, the internal 
integer value "wraps around" to a negative number.

Solution:  set the Display Value to at least "As Is", which says 
"don't scale it at all, just store it as you receive it."  (Format 
data, Settings tab, Universe button, and set the Display Value.)  
That will work for values up to 2^31 = 2.1 billion.  That's enough 
for all past data, I believe, but you might want to set it to 10 or 
even 100 to make sure you never have a problem with it.  (That means 
the largest values TS can store are 10*2^31 or 100*2^31.  It also 
means you'll lose the 10's digit or the 10's & 100's digits, but who 
cares when you're looking at values in the billions?)

Gary