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

Re: detecting time gaps in real time data



PureBytes Links

Trading Reference Links

You could have TS write something to an external file every tick and close 
the file every (say) 10 ticks then have a batch job running in a DOS box 
which uses a shareware program to check the size of a copy of the file to 
the most recent version every 30 seconds or so.  If two 30 second periods 
go buy without a change, the batch file could start beeping.   -uf

At 04:50 PM 7/21/99 -0400, you wrote:
>ts executes code per bar.
>that means it will warn you only on the first bar after the time gap,
>not during or in the middle of the time gap since there are no bars to 
>execute the code on.
>i tried in the past and it will only give you an indication of "you've 
>just had a time gap"
>when the data comes back on.
>unfortunately nothing could be done about it.
>another "minor" omitted detail.
>i'm gonna send an e-mail to tswishlist on that.
>correct me if i am wrong before i do that.
>val.
>
>Dennis Holverstott wrote:
>
> > > write an easy language routine that would tell if the chart you are 
> looking
> > > at has received data in the last 2 minutes,
> >
> > How about something like this indicator applied to a 1-tick chart of an
> > active symbol? It won't tell you anything about the chart you are
> > looking at but it should give you an alert if your data feed goes down.
> >
> > input: nodata(2);
> > var: t1(0), t2(0);
> >
> > t1 = calctime(time,-nodata);
> > t2 = time[1];
> >
> > if t2 < t1 then begin
> >   if checkalert then alert = true;
> > end;
> >
> > if false then plot1(c,"");
> >
> > I haven't verified this but it should work in TS4. No idea about BS2Ki.
> > Set it to update every tick and enable the alert. The chart can run
> > minimized in the background. It won't plot anything but, if the feed
> > stops for more than 'nodata' minutes, it will pop up an alert.
> >
> > --
> >    Dennis