Custom Streaming provider - no event is fired
Author: jheffez
Creation Date: 12/9/2020 12:04 PM
profile picture

jheffez

#1
I wrote a static data provider (for IB). Now I'm focusing on streaming. I re-purposed the old google provider code from the wealthlab site. While the chart is open, I click on the streaming button on the bottom right. But no event is fired in the GoogleStreamingV2.cs file. Not even the Initialize function.
Can someone please point me in the right direction?

Ref: https://www2.wealth-lab.com/wl5wiki/apiStreamingDataProviders.ashx
profile picture

Eugene

#2
Make sure the project targets .NET 4.6 or 4.7 and the DLL is placed in the WLD main folder under Program Files.
profile picture

jheffez

#3
Yap, both are in place. Using .NET 4.72. Running VS as admin so it places the DLL in the program's folder automatically when launching debug.
Static works fine (repurposed your old google code).

I assume that once I click on the streaming button - something (Initialize) should fire. Please help.
profile picture

Eugene

#4
Yes it should but only if you select your new Streaming provider in Wealth-Lab's Preferences > Streaming Data.
profile picture

jheffez

#5
Bingo!
Thanks Eugene!!
profile picture

Eugene

#6
Glad I could be of assistance!
profile picture

jheffez

#7
Hi!

Working on the the IB provider, I'm able to catch and handle a "cancel update" event in the DataProvider window ( in public override void CancelUpdate() ). However, on a chart window, while retrieving data, pressing on {Esc} key to cancel chart operation spits:
CODE:
Please log in to see this code.


How to catch {Esc} event?
profile picture

Eugene

#8
I don't think it's an event you can catch.
profile picture

Cone

#9
Isn't the answer to simply handle this error with try/catch in your download thread and return whatever data you had retrieved until then?
profile picture

jheffez

#10
Well, I was hoping for a simple solution like the cancel event. Cone's solution would be the next best option.
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).