Streaming adapter bug when opening several windows with same symbol
Author: Compaqster
Creation Date: 1/8/2013 7:14 AM
profile picture

Compaqster

#1
If I open some windows with same data. The second and the following windows can lose part of quotes.
As on the picture.

How I can fix this bug?
Ver 1
CODE:
Please log in to see this code.


Both versions of the adapter have a bug on ghosh bar
profile picture

Eugene

#2
Please do not post the complete code for a solution like data provider on the public forums. I have removed the code from your post.

It's enough to include only a fragment of the code in charge of the feature.

P.S. Kindly consider checking out the working streaming provider's code from the Wealth-Lab Wiki, if you haven't already done so.
profile picture

Compaqster

#3
My adapter
CODE:
Please log in to see this code.


Convert from one format to another and call UpdateQuote (quote);
But why I have a loss of data in the ghost bar?
profile picture

Eugene

#4
QUOTE:
But why I have a loss of data in the ghost bar?

For example, this line suggests that you're filtering an incoming tick if its timestamp is equal to lastTrade.Time:
CODE:
Please log in to see this code.

If a tick comes having an identical timestamp, it's lost.
profile picture

Compaqster

#5
If I start this code only in one window then everything is fine, but if you open a new window into the same moment then I lose tics.
I rewrote the data updating like in google adapter but it didn't help.

CODE:
Please log in to see this code.


CODE:
Please log in to see this code.


CODE:
Please log in to see this code.
profile picture

Eugene

#6
Is "this.buffer" that you use for locking defined as a private static variable? This is recommended to avoid deadlocks.

In debugging, I'd pay attention to the integrity of your collection of ticks.

Since the Subscribe method is called only once per symbol at the moment of of initial subscribe, it's irrelevant in this context. I'd count it out when debugging. Next, receiving tick updates from the feed also should not be the culprit: it only matters for new ticks whereas your streaming windows seem to loose already received ticks.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).