I have been studying the price level changes between the various NT methods and I am hitting something that is not clear to me.
I have a sample strategy enclosed along with an output in excel to illustrate my concerns / questions. What I am looking at is just the sequence of price level changes captured on the two event handlers OnBarUpdate, and OnMarketData. I am running this one a 1 tick time series at the most granular level possible. The sample was ran on the ES on April 16th during the first part of the US cash open. Considering that the data series is 1 tick, it doesn't matter if the OnBarUpdate calculates on every tick, or on bar close, as these two will be the same.
I have studied the documentation and understand that OnBarUpdate front runs OnMarketData and will be 1 tick ahead in most cases. That's okay and I can work with this.
What I am looking for is a single consistent method to use to capture the following:
1. The fastest possible method to capture a price level change event: (Bid or Ask price moves up or down 1 tick)
2. This method will capture EVERY price level change, and omit nothing.
While I can tell that when the OnBarUpdate does run an update it will always front run the other methods, the issue is that it does not seem to capture every price level change.
In the enclosed excel output consider the following:
1. On Row 176 we can see that the OnBarUpdate method front runs the OnMarketData method and captures the price level change first. This is expected and makes sense.
2. On row 605 the OnBarUpdate prices (Bid / Ask) do not change, yet the OnMarketData prices (Bid /Ask) hit a new price level. How is this possible considering that the OnBarUpdate event is suppose to run first?
3. On row 992 the OnBarUpdate prices (Bid / Ask) do not change, yet the OnMarketData prices (Bid /Ask) hit a new price level. How is this possible considering that the OnBarUpdate event is suppose to run first?
4. On row 1097 the OnBarUpdate prices (Bid / Ask) do not change, yet the OnMarketData prices (Bid /Ask) hit a new price level. How is this possible considering that the OnBarUpdate event is suppose to run first?
So what is going on here? There are only 1 of 2 possibilities.
1. The OnMarketData updates are capturing events that really occurred and the OnBarUpdate method is not able to see these price level change events. If this is the case, then this is a serious design flaw. How is this possible?
2. The OnMarketData price level changes are not real, there is an error in the code somehow. Only the OnBarUpdate price level changes are real.
Please investigate this and let me know what is going on here.
Thanks,
Ian
Comment