Streaming adapter and symbol = empty string
Author: Compaqster
Creation Date: 1/2/2013 7:13 AM
profile picture

Compaqster

#1
Hello
I'm trying to do streaming adapter but I have a problem.
Sometimes wealth lab sends me a empty string in the method instead of the name of the tool.



profile picture

Eugene

#2
You're handling the situation correctly. Checking for !string.IsNullOrEmpty is what you should be doing. This is not a bug.
profile picture

Compaqster

#3
Ok.
How can I know from which Quote continue to send data? If I open several windows with one tool.
profile picture

Eugene

#4
I don't get it. Please rephrase your question.
profile picture

Compaqster

#5
I mean. If to open a second window with the same instrument. Wealth lab calls a method UnSubscribe (string symbol). But I do not know for which instrument it is called, and I can’t save quote from which will need to continue to call the UpdateQuote when Subscribe (string symbol) will be called.
profile picture

Eugene

#6
I still don't know what you're after, because it's so different from what we do in streaming providers.

Of course you do know for which instrument UnSubscribe is being called: string symbol. There is no connection with Subscribe/Unsubscribe: you call UpdateQuote only when your data feed sends you a quote update. So the answer is, your provider should continue proceeding with first new quote (when) sent to your data provider by the feed.

There is no way of knowing which particular instance (be it a Quotes window, a streaming window or a streaming Strategy Monitor thread) unsubscribed from a given symbol, if this is what you were asking. Why worry? Wealth-Lab internally maintains a list of subscribed symbols, guaranteeing that your provider will receive this call only once per symbol.
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).