Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Slippage does not appear to be taking affect

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

    Slippage does not appear to be taking affect

    I have a strategy running in Replay Historical on a Range chart. The chart does not have Tick Replay on.
    The strategy is set to calculate on price change.
    I have slippage for the strategy set to 1 tick.

    I attached a screen shot showing a market order to short getting filled at the high of a bar.

    That's a little too optimistic. The fill be one tick less than the high of the bar?
    Attached Files

    #2
    Originally posted by Brillo View Post
    I have a strategy running in Replay Historical on a Range chart. The chart does not have Tick Replay on.
    The strategy is set to calculate on price change.
    I have slippage for the strategy set to 1 tick.

    I attached a screen shot showing a market order to short getting filled at the high of a bar.

    That's a little too optimistic. The fill be one tick less than the high of the bar?
    And with slippage set to 2 there's no difference. See attached.
    Attached Files

    Comment


      #3
      Hello Brillo,

      Thank you for your note.

      I could not recreate the same effect on my end. When using slippage it was in fact being factored into the trades on Historical Replay.

      Do you see the same behavior on the SampleMaCrossover?
      What instrument are you using?
      What size is your Range bar?

      Comment


        #4
        I'm using ES 06-15 Range 10 RTH template.
        I tried the crossover strat but it's difficult to reproduce due to the nature of the algorithm. There are probably some cases but it's trading as the market is reversing.

        To help demonstrate the problem I wrote a sample that trades the "ends" of the bar. Put it on a Range 10 chart and you will get a lot of examples.

        See attached for the strategy and a screen shot of a case example of a market order reversal that took place a the high of a bar.

        I had slippage set to one. I was running Replay Historical.
        Attached Files

        Comment


          #5
          I have noticed the same behavior in NT8 but with a strange twist. If you look at the results page for an optimization, WFO etc.... the row labeled Slip shows zero. If you then select from the drop down list a different metric......say an equity curve or maybe max draw down, the choice doesn't matter and then go back to the summary page the slip will now show as one would expect. Furthermore, when I check the trades the slip has been properly applied (I think it only applies the slip to the entry and not the exit is this in itself correct?). I discovered this while checking trades as I was also supprised that zero slip was showing. I'm guessing the actual Gross, net etc.... totals are correct. Any feedback on this?

          GuppyDRV

          Comment


            #6
            Originally posted by GuppyDRV View Post
            (I think it only applies the slip to the entry and not the exit is this in itself correct?).GuppyDRV
            Regarding this part of your testimony: Is your entry a market order and the exit a limit order? If so then that's the reason for that part...slippage only applies to market orders.

            Comment


              #7
              Patrick,

              I'm so sorry!

              I found a bool value that controls whether or not my strat is submitting limit orders or market orders. It's initialized to false meaning that it should be market orders. However elsewhere in the script it's set to true and so this is the reason I'm not seeing any slippage.

              I'm sorry for wasting your time.

              Comment


                #8
                My strategy is running market orders only. I just reconfirmed the behavior and my findings are spot on.

                Were you using limit orders?

                GuppyDRV

                Comment


                  #9
                  So here is an example. I just made up a quick MA cross over with long and short using market orders. The first file shows the Summary screen with no slip the second shows the Summary screen with the slip applied.

                  The only thing different is that with the second I used the drop down list and selected a different view in this case chart. I then checked that the slip has been applied against the (Entry only on the chart) then switched back to the summary view. Upon switching back the slip has appeared.

                  I'm thinking either I'm not doing something correctly or there is a glitch in the presentation and/or calculations.

                  GuppyDRV
                  Attached Files

                  Comment


                    #10
                    Originally posted by GuppyDRV View Post
                    My strategy is running market orders only. I just reconfirmed the behavior and my findings are spot on.

                    Were you using limit orders?

                    GuppyDRV
                    Yes I was using limit to enter ( and to exit ).

                    Comment


                      #11
                      Bump,

                      Any chance that an NT tech specialist can have a look at this.

                      GuppyDRV

                      Comment


                        #12
                        Hello All,

                        Thank you for your patience.

                        I figured we were testing Replay of historical data. Seems you are all looking at historical fills, as in the calculated fills over the historical data (NOT replayed). So essentially, a backtest.

                        The fill logic will be different for a historical backtest than in realtime or replay.I recommend reviewing the Historical Fill Processing at the following link: http://ninjatrader.com/support/helpG...ical_fill_.htm

                        If you have any questions please let me know.

                        Comment


                          #13
                          Patrick,

                          Thanks for the reply. I think we are miss communicating. I'm looking at Optimization and Walk Forward Optimization on historical data not market replay. I am aware of the fill process and maybe should have said that I'm trading futures contracts so 1 would actually be just 1 contract unlike the need to express FX as the actual dollar amount desired. Disclaimer I do not trade FX so I may be stating that wrong but I hope the point is made.

                          My main point is the slip is not shown on the summary page on first pass but shows if you select a different choice on the drop down menu then select back to summary. Please reference my upload picture one. Additionally I understand that slip will never exceed the bar range but what I'm asking is slip applied to both the entry and exit if the range of the bar allows?

                          One additional question. Is there a way to show all of the performance metrics for the entire Walk Forward Optimization rather than just the individual OOS (out Of Sample) periods. So can I create an equity curve from the whole of the walk forward? Am I just missing how to do this or does it not exist? If not can we add that as a future enhancement request?


                          Thanks for your help.

                          GuppyDRV
                          Last edited by GuppyDRV; 11-18-2016, 04:59 PM.

                          Comment


                            #14
                            I was not talking about historical backfill. I was using Replay connection, historical.

                            Comment


                              #15
                              Brillo,

                              What you are seeing is not expected. Can you send us your log and trace files by going to Help > Email Support? Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Gerik, Today, 09:40 AM
                              2 responses
                              6 views
                              0 likes
                              Last Post Gerik
                              by Gerik
                               
                              Started by RookieTrader, Today, 09:37 AM
                              2 responses
                              10 views
                              0 likes
                              Last Post RookieTrader  
                              Started by alifarahani, Today, 09:40 AM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by KennyK, 05-29-2017, 02:02 AM
                              3 responses
                              1,285 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by AttiM, 02-14-2024, 05:20 PM
                              11 responses
                              186 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X