Can I suggest that you create a custom indicator using the attached code and then run it against any instrument.
I have also attached the log that it generates when connected to my ZenFire feed for the 6E futures contract.
You will see that the order of events firing is:
Initialize()
Time : 16:05:19
This event is fired when the Indicators dialog box opened
Initialize()
Time : 16:05:25
This event is fired when the DumpEventSequence indicator is selected within the Indicators dialog box
OnMarketDepth()
Time : 16:05:28
MarketDataType : Ask
Operation : Insert
Position : 0
Price : 919.5
Volume : 668
This event is fired 10 times to insert the 10 rows of the order book
Initialize()
Time : 16:05:28
This event is fired when the DumpEventSequence indicator is added to the chart
OnBarUpdate()
Time : 16:05:28
This event is fired numerous times as the DumpEventSequence indicator processes the historical bars
As you can see, the OnMarketData() method is called to build the initial order book before the Initialize() method is called in response to the indicator being added to the chart.
Please can you verify this.
I am running NT v6.5.1000.10.
Comment