[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

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