cb888trader wrote:
1. Is there a more reliable way to get a feedback of subscription status rather than wait for 1000 milli?
The subscription happens in the strategy thread, meaning that setting such waiting time in our previous example was redundant and unnecessary.
cb888trader wrote:
2. Does the onBar callback from line 2 will be called on the Strategy thread or is it spawned on a different thread?
No, this happens in the strategy thread.
cb888trader wrote:
3. How to avoid missed bars? I want to make sure that the loading from history includes all available bars including bars that arrive during the sleep operation in line 2
4. If onBar from line 1 is executing too long is it possible that the system will drop bars instead of buffering them?
Presumably the previous 2 answers clarify also those 2 questions.