• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Slippage algorithm?

  • 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?

    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?
    Patrick G.NinjaTrader Customer Service


      Hi Patrick,

      * NT8 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.


        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.
        Patrick G.NinjaTrader Customer Service



          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


            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.
            Patrick G.NinjaTrader Customer Service


              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 —

              Patrick G.NinjaTrader Customer Service


                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.


                Latest Posts


                Topics Statistics Last Post
                Started by giogio1, 11-10-2019, 11:23 PM
                4 responses
                Last Post bltdavid  
                Started by Dolosumo, Today, 01:05 AM
                0 responses
                1 view
                Last Post Dolosumo  
                Started by StevenNelson, Yesterday, 07:31 PM
                1 response
                Last Post NinjaTrader_ChrisSch  
                Started by dtl-saw, Yesterday, 09:37 PM
                0 responses
                Last Post dtl-saw
                by dtl-saw
                Started by TazoTodua, Yesterday, 03:01 PM
                3 responses
                Last Post TazoTodua