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

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



PureBytes Links

Trading Reference Links

Thanks all, good solution here. 

Now I am only awaiting the obligatory post from Pierre stating that all
users should always be prepared to do this kind of logic in all their
systems and indicators, it is not to be seen as a disadvantage, and having
double precision in TS is unneccessary since having that work automatically
is not to be expected of cheap programs like TS.

In fact, I think it can be proven that the difference is below the seventh
digit precision limit that TS holds, you just have to be prepared to read
the diagrams in a more flexible way when dealing with high volume issues.

:-)

> -----Original Message-----
> From: macsmith [mailto:macsmith@xxxxxxxxx] 
> Sent: den 21 september 2001 20:50
> 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
> >
> 


This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst & Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.