Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issue with Unfilled Limit Orders using Market Replay

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Issue with Unfilled Limit Orders using Market Replay

    Good Morning,

    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






    #2
    Hello iantg,

    Thank you for your post.

    I'd like to test on my end to see if what you're experiencing would be expected or not.

    Could you provide your example script?

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Good Afternoon,

      Enclosed is the sample script that I used to produce this output.
      I ran this between 9:30 and 10:10 eastern for the NQ yesterday.
      I am using a 1 tick data series and using the high fill order resolution.

      The 3 orders in question were submitted but never filled around 9:40, 9:50 and 10:00

      Please let me know if you have any further questions to test this.

      Thanks in advance!

      Ian

      Attached Files

      Comment


        #4
        Hello iantg,

        Thank you for your reply.

        For your questions,

        1. Sim/Playback use real time market data. We don't have specifics on fill behaviors with realtime that we do with historical, but we still expect a tick through to fill a limit order. We are probably just not looking at the right data and we should look at bid ask and last to look at it all between when the order submission in question takes place and when you expect the fill.

        2. Sim does require volume, but we still expect a tick through to fill, so we should be sure we are looking at the right ticks and focusing on a specific order submission at a specific time to focus the test.

        3. Random delays are added in Sim but not added in Playback, this should not be relevant, however.

        The prints you have in the script aren't great to analyze this scenario. We would try to look at this as:

        1. Order gets submitted at specific bid/ask/last event at a specific timestamp from marketDataUpdate, then track the price of the order and the timestamp of the submission. You should be able to note a specific time (tick timestamp from OnMarketData) where you expect the order to be filled, and is not.

        2. After this submission is made, track all bid/ask and last price updates and timestamps until we reach the timestamp in question.

        So, if you can get this to a single order submission looking at a specific timestamp to trigger the order submission, and the bid/ask/last streams after, we can thoroughly review.

        Thanks in advance; I look forward to assisting you further.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gabrielle, 12-17-2018, 12:17 PM
        3 responses
        1,387 views
        0 likes
        Last Post rrogerswealth  
        Started by phuochh, Yesterday, 10:46 PM
        0 responses
        14 views
        0 likes
        Last Post phuochh
        by phuochh
         
        Started by Johnny Santiago, 10-11-2019, 09:21 AM
        81 responses
        4,630 views
        0 likes
        Last Post xiinteractive  
        Started by designer01, Yesterday, 09:38 PM
        0 responses
        11 views
        0 likes
        Last Post designer01  
        Started by xiinteractive, 11-10-2022, 09:29 AM
        2 responses
        27 views
        0 likes
        Last Post xiinteractive  
        Working...
        X