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

FW: RE: Problem with plotting volume as a symbol in chart



PureBytes Links

Trading Reference Links



-----Original Message-----
From: Mike Moore [mailto:mmoore04@xxxxxxxxxxxxx]
Sent: Friday, September 21, 2001 2:34 PM
To: ian@xxxxxxxxxxx
Subject: RE: RE: Problem with plotting volume as a symbol in chart

Couldn't wait until the end of the day. So, I went back to Monday and
Wednesday.  The correct volume was higher than 2147483647 and when
2147483647 was subtracted from the correct volume, I came up with a number
that when added to my indicator's volume was 2147483649.  A difference of
two.  Could it be the limit is 2147483648?
Again, Thanks for the heads up as I never noticed the shortfall.


Mike Moore

-----Original Message-----
From: macsmith [mailto:macsmith@xxxxxxxxx]
Sent: Friday, September 21, 2001 1:50 PM
To: mike@xxxxxxxxxx
Cc: omega-list@xxxxxxxxxx
Subject: Re: RE: Problem with plotting volume as a symbol in chart

If 2147483647 is the limit then I think your solution of negating the volume
gives the wrong answer.  Once the volume goes above 2147483647 then -volume
will start to count down from 2147483647 as the volume ticks up (two's
compliment arithmetic).  I can understand that it would be easy to miss this
as it probably wouldn't go below 2000000000 and would seem plausible.

I don't know that there is a solution.  If TS is using 32 bit signed numbers
then this is a hard limit.  You might consider ploting the volume in blocks
of 100, ie:

if vol < 0 then begin
  blockVol = 21474836.47 + (-vol/100)
else
  blockVol = vol/100;

This should work until volumes reach 200B+ !

Ian Smith

>On Fri, 21 Sep 2001 13:33:40 -0500 "Mike Moore" <mmoore04@xxxxxxxxxxxxx>
wrote.
>It could very well be that number.  It has been some time since I looked
>into the problem.  I remember it was greater than 2 billion but I don't
>recall narrowing it down to a specific number.
>
>Mike Moore
>
>-----Original Message-----
>From: ian [mailto:ian@xxxxxxxxxxx]
>Sent: Friday, September 21, 2001 1:02 PM
>To: mike@xxxxxxxxxx
>Subject: Re: Problem with plotting volume as a symbol in chart
>
>could the volume limit be 2147483647?  (2**31) -1      two's compliment 32
>bit
>number.
>
>Ian Smith
>
>Mike Moore wrote:
>
>> I also had a problem with TS giving incorrect volume when the volume was
>> above 2 billion.  My solution was to create the following new indicator.
>> Hope this helps.
>>
>> Inputs: AvgLength(50), BreakoutPcnt(50), UpVolColor(Green),
>> DownVolColor(Red);
>> Variables: Vol(0), AvgVol(0), LrgVol(0);
>>
>> If Volume < 0 then begin
>>         LrgVol = -(volume);
>> end
>> Else begin
>> LrgVol = Volume;
>> end;
>>
>> If Volume <> 0 Then Begin
>>         If DataCompression >= 2 Then Begin
>>                 Plot1(LrgVol, "Volume");
>>                 Plot2(Average(LrgVol, AvgLength), "Volume Avg");
>>         End
>>         Else Begin
>>                 Plot1(UpTicks   DownTicks, "Volume");
>>                 Plot2(Average(UpTicks   DownTicks, AvgLength), "Volume
>Avg");
>>         End;
>>
>>         If Close >= Close[1] Then
>>                 SetPlotColor(1, UpVolColor)
>>         Else
>>                 SetPlotColor(1, DownVolColor);
>> End;
>>
>> IF Plot1 >= Plot2 * (1   (BreakoutPcnt * .01)) Then
>>         Alert("Volume is "   NumToStr(BreakoutPcnt, 2)  "bove its
>average");
>>
>> {Volume Expert Commentary}
>> #BeginCmtry
>>         Commentary(ExpertVolumeAvg(Plot1, AvgLength, BreakoutPcnt));
>> #End;
>>
>> I am using TS2000 and have charts that plot and use as systems input
data,
>> 60 minute bars of total volume as a symbol for both New York and NASD.
>>
>> My problem is that when total volume goes over 2 billion, TS plots the
>close
>> as 0 rather than the correct number.  The correct number is in the global
>> server but won't plot correctly.  I am using e-signal as a data feed.
>>
>> Is there a fix available.
>>
>> Roger
>