Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Slippage algorithm?

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

    Slippage algorithm?

    I notice that sometimes, when sim trading with Market Replay Data, that stop limit orders are not filled after the market moves to my target price. I wonder what the programming intent of this is ... to simulate slippage? To simulate the possibility that stop limit orders are not always filled?

    #2
    It would depend on exactly what you're experiencing to determine whether this is the simulation engine simulating slippage or some other root reason. I'll need more information.

    What version of NinjaTrader 8 are you using? Please provide the entire version number. This can be found under Help -> About (Example: 8.0.X.X)

    First, can you identify a time at which an order doesn't fill 100% of the time when you would expect it to? What instrument, time, and date is that? For example, a stop limit order on ES 03-19 at X price on 1/2/19 1:36PM eastern US time. Or does the issue seem more random/intermittent?

    What offset have you chosen for your stop limit order when this occurs?

    At what speed are you running playback when this occurs? Does it occur at 1x speed, or only at a higher speed like 500x?

    Comment


      #3
      Hi Patrick,

      * NT8 8.0.16.3 64-bit

      * I have not journaled a time this has occurred. The behavior appears randomly. The next time it happens I will be sure to log the circumstances.

      * Offset is set to zero

      * Playback speed = 1x. This is when I have seen the issue.





      Comment


        #4
        If you identify a specific time this occurs please let me know.

        Also keep in mind that setting the offset to zero means that the order's stop price and limit price are the same. This means that the order will fill on that one exact tick only. If there is not enough volume to fill your order at that one tick and the market moved past your order, the order will not fill.

        Comment


          #5
          Patrick,

          Attached is a screenshot of a sell sim trade that did not close as hoped/wished/expected.

          As you can see, the market dropped to my target of 2778.75 but the ATM buy order at that price was not filled. Instead, unfortunately, the stop loss at 2781.75 was filled not long after.


          Although I did not record the volume at the moment the market was at my target, I've nevertheless included the SuperDOM in the screenshot to give a general idea of the volume.

          This was ES 12-18 on 11/9/19 about 9:15 AM.
          Attached Files

          Comment


            #6
            I would need information from your log and trace files to be able to further analyze this sim order submission issue. Please send me your log and trace files so that I may look into what occurred.
            • You can do this by going to the Control Center-> Help-> Email Support
            • Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.
            • Please reference the following ticket number in the body of the email: 2045278 ATTN PatrickG. Also, make sure to include a link to this forum thread.

            Comment


              #7
              I am updating this forum thread with what we discovered in your case:

              Buy orders fill at the ask price. I replayed the ES 12-18 data on 11/09/18 between 9:13a and 9:15a and see that the ask price did not reach 2778.75, but the last traded price/bid did reach this price. Since, by default, your chart plots last traded price, visually i would expect it to reach 2778.75 but since the ask did not reach that level your buy limit order was not filled. This is expected. Here is a chart with three data series of 1 second interval. From top to bottom, this is displaying last, ask, and bid prices with a horizontal line representing he price at which your profit target order resided:

              11/09/18 —



              11/14/18 —


              Comment


                #8
                Patrick! A yeoman's work!

                Thank you so very much for this clear and fascinating explanation. And for your effort in ensuring I understand. Most appreciated.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by adeelshahzad, Today, 03:54 AM
                4 responses
                22 views
                0 likes
                Last Post adeelshahzad  
                Started by merzo, 06-25-2023, 02:19 AM
                10 responses
                823 views
                1 like
                Last Post NinjaTrader_ChristopherJ  
                Started by frankthearm, Today, 09:08 AM
                5 responses
                15 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by jeronymite, 04-12-2024, 04:26 PM
                3 responses
                43 views
                0 likes
                Last Post jeronymite  
                Started by yertle, Today, 08:38 AM
                5 responses
                16 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Working...
                X