I am experiencing an issue with specific orders not getting filled using market replay. I built a sample script to document how and where this issue occurs. I am enclosing an image of my print statements illustrating the issue. This example is using the NQ market replay data from yesterday.
In the first example I submit a Long Limit order at 14551.5. At this point in time the market is at the Ask price of 14553.25. The market eventually moves 1 tick below my limit order price and hits a bid price of 14551.25. But my limit order does not get filled. In a real live trading scenario it would not be possible for the bid price level to move from 14551.5 down to 14551.25 without every order in the queue at 14551.5 getting filled first. So I see this as an issue.
The enclosed image contains 2 more examples of the same behavior.
As a reference I am submitting my orders from the OnMarketData event handler, using a 1 tick time series and the high fill resolution, and processing on every tick, and I am using the newest version of NinjaTrader 8 (I installed it last week).
My working theories are:
1. It's possible that the SIM engine doesn't run on the OnMarketData event handler, or at least doesn't match up with the price sequence correctly. So it is missing fills due to a time / price sequence issue.
2. The SIM engine is requiring a specific volume in order to assume a fill would have occurred. And this is fine for cases when the market never went beyond the entry price by 1 tick. But in my examples the market moves beyond the entry limit price by 1 tick. So I would expect this to make this a non issue.
3. Due to the time stamps, and some built in lag in the Simulator, my order is not moving from working > filled before the entry price is reached.
Either way, I view this as bug. Could someone please look into this for me and let me know specifically why this behavior occurs?
I would be glad to send over my example script that created this output if someone would be willing to look into this for me.
Thanks in advance.
Ian
Comment