PureBytes Links
Trading Reference Links
|
To: mike@xxxxxxxxxx,ian@xxxxxxxxxxx
Subject: Re: Re: RE: Problem with plotting volume as a symbol in chart
From: "macsmith" <macsmith@xxxxxxxxx>
Date: Fri, 21 Sep 2001 12:11:35 -0700 (PDT)
OOPs, got my solution wrong. It should be:
if vol < 0 then begin
blockVol = 42949672.96 + vol/100
else
blockVol = vol/100;
And of course, the limit would then become 4 billion, not 200B.
>On Fri, 21 Sep 2001 11:50:12 -0700 (PDT) macsmith <macsmith@xxxxxxxxx>
wrote.
>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
>>
>
|