Works beautifully when starting the AddOn with a single, connected Connection (it happens to be the FREE NinjaTrader Forex data feed). As part of testing contingency code for various circumstances, I deliberately disconnect from that one Connection. No problem recognising the Connection has disappeared.
I then reconnect the same Connection. The reconnection is detected (independently of OnBarUpdate) and OnBarUpdate seems to be being invoked again. However, within a few seconds, all updates stop completely -- not even a single invocation of OnBarUpdate. At no point is the BarsRequest.Update event explicitly changed, nor the actual BarsRequest objects themselves.
The observations above come from the extensive tracing output I produce.
Notably, charts with the same Instruments as for the BarsRequests update as expected after the reconnection, so the data flow is indeed restored.
Questions:
- Is there any obvious reason why this might happen?
- Does a disconnect cause any form of implicit change to BarsRequest.Update events?
- Any recommended approaches to diagnose this?
Thanks.
[Codebase is 75K lines so no real opportunity to provide it, sorry. Complexity probably prevents a "simple" example too.]
Comment