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
Size:
Color:
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.
Size:
Color:
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?
Size:
Color:
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.
Size:
Color:
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.
Size:
Color:
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.
Size:
Color: