I am having a few issues with OnBarsReceived / OnBarsChanged. The problem is that I request something similar to :
RequestHistory("ES #F", btDAYS, "100V", 1, -1, -1)
For 90% of the bars I receive I it has 100 contracts per bar. But the other times I get a volume less than 100 .... anywhere from 1 to 99.
I am handling the OnBarsChanged event as an update, almost line for line as the example in the documentation shows. So if I received a bar of 50V, and then receive the OnBarsChanged event, I update that bar ... I do not create a new bar.
It appears that I am getting a OnBarsReceived event (new bar) before the OnBarsChanged event has completed the 100V existing bar.
Any ideas? If I run the program after market hours it is perfect because no OnBarsChanged events are fired.
Thanks
RequestHistory("ES #F", btDAYS, "100V", 1, -1, -1)
For 90% of the bars I receive I it has 100 contracts per bar. But the other times I get a volume less than 100 .... anywhere from 1 to 99.
I am handling the OnBarsChanged event as an update, almost line for line as the example in the documentation shows. So if I received a bar of 50V, and then receive the OnBarsChanged event, I update that bar ... I do not create a new bar.
It appears that I am getting a OnBarsReceived event (new bar) before the OnBarsChanged event has completed the 100V existing bar.
Any ideas? If I run the program after market hours it is perfect because no OnBarsChanged events are fired.
Thanks
Comment