Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Incorrect Slippage Applied

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

    Incorrect Slippage Applied

    Hi,

    I have specified a slippage of 2 but a slippage of more than two is being applied during execution. The order quantity is 1.

    The trace long states:

    === OnExecution() ===
    Slippage = 2
    execution.Order.StopPrice = 1138.4
    execution.Order.AvgFillPrice = 1138.7

    Is there any reason why this could happen? Any ideas would be greatly appreciated. Thank you.

    #2
    Hello Zeos6,

    Thank you for your post.

    Do you see the same thing happening with any other scripts? Sample MA CrossOver, etc

    Can you please provide a screenshot of back test results, specifically of the chart and where this execution took place?

    To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file. Click Reply -> Go Advanced -> Click the Paperclip icon on the toolbar

    For detailed instructions please visit the following link

    How to take a screenshot on your smartphone, tablet, notebook or desktop computer
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hi Cal,

      Here is the image requested.
      Attached Files

      Comment


        #4
        Zeos6,

        Was this a StopMarket or StopLimit order that was submitted?
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Hi Cal,

          The entry order was:
          EnterShortStop()

          Comment


            #6
            Zeos6,

            This is what the FillType is looking for. The FillType looks at the next bar and for a StopMarket Buy order;
            if the stop price is less than the next open, it will find which value is small between, the high or the open + the slippage amount. In this case the high, which is also the open, is the smaller value and thus got filled at that price.

            You can view how the FillType works by going to (My) Documents -> NinjaTrader 7 -> bin -> Custom -> Type and checking the @DefaultFillType

            Let me know if I can be of further assistance.
            Cal H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by Zeos6 View Post
              Hi Cal,

              The entry order was:
              EnterShortStop()

              You used a Market Order. That means that you will almost always have what looks like additional slippage, but is really just the effect of market dynamics and the bid/ask spread. I am assuming that your instrument has a bid/ask spread of 1 tick?

              Comment


                #8
                Thanks for the explanation Cal. It makes sense, especially as there is a 4 tick gap between the bars. The 1138.6 is the low for the bar on which the order is filled, and 1138.7 is the high, and the open. Thank you for the clear explanation. I will check out the FillType code in more detail.

                Comment


                  #9
                  Hi koganam,

                  Thank you for your reply. Yes, the bid/ask spread is 1 tick.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  633 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  364 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  105 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  567 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  568 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X