Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Slippage Live vs Sim

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

    Slippage Live vs Sim

    Hello and thanks you for your beautiful software.
    I have been evaluating NT8 with some Ninjascript automated strategies of mine and I am ready to purchase a license and open a trading account.
    I just have a few questions I hope you will answer for me.

    1. Whilst watching my strategy execute I notice huge slippage from when a signal is generated to when it should be placed at the end of a bar close. Very often between 4 -8 ticks and sometimes more when the market is very active. I understand the Sim data feed is not high quality but will I experience the same kind of slippage with a live feed if I have an account and a license or is the data quality better?
    2. Once I execute a strategy is it running from my PC or on a server somewhere? Where are the possible delays between a signal being generated and executed. Are signals such as crossovers generated by the actual lines or indicators on my screen? If so will it help to have a faster graphics card, a more powerful processor and a faster internet connection?

    Thank you in advance

    #2
    Hello IndieTrader,

    Thank you for your post.

    What 'Calculate' mode are you running your strategy on? (OnBarClose, OnPriceChange, OnEachTick).

    Running a strategy with a Calculate mode of OnBarClose will place trades at the close of a bar when a signal to place an order occurs during that bar. If you would like to have orders placed the moment a signal to place an order occurs, you would need to run your strategy either OnPriceChange or OnEachTick. See the help guide documentation below for more information.

    Calculate - https://ninjatrader.com/support/help.../calculate.htm

    The strategy will run from your PC once it is enabled. Entry signal conditions (such as crossover conditions) are generated by indicator values that are processed by your strategy. The indicator does not have to be displayed on the chart as long as it is programmed to be used in your strategy.

    Delays could be caused by internet transmission so these will vary based on the data feed provider you are using and your location. A fast graphics card would have zero impact on trade decisions that are made. If you are concerned about speed, you might consider using a VPS co-located at the exchange for faster executions.

    Let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Brandon. I'm using calculate on bar close because I've noticed that when using calculate on tick with Renko bars that when there is an almost reversal that it calculates the EMA's as having crossed and executes an order in the wrong direction incurring a massive loss I know this happens because I am using extremely small EMA's (1 and 3) to generate signals. So on bar close works for me except the orders are not being put in at bar close but a few bars lower or higher plenty of times. My question is whether this is the nature of the Sim feed? If I pay for professional filtered data will this still happen? I've attached a screenshot to show what happened when I used calculate on tick. This would not happen if calculating on bar close. I know these are not your Renko bars but the same thing happened when using your standard Renko

      Comment


        #4
        Hello IndieTrader,

        Thank you for that information.

        This behavior would not be due to using the Simulated Data Feed.

        If the expected trade(s) are not appearing, this would indicate that the condition to place the order is not evaluating as true or the order is being ignored for other reasons.

        To understand why the script is behaving as it is, such as placing orders or not placing orders when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

        In the strategy add prints (outside of any conditions) that print the values of every variable used in every condition that places an order along with the time of that bar. Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

        If you are unable to determine why orders are or are not being placed by using prints, enable TraceOrders which will let us know if any orders are being ignored and not being submitted when the condition to place the orders is evaluating as true.

        Below is a link to a forum post that demonstrates using prints to understand behavior and including a link to a video recorded using the Strategy Builder.
        https://ninjatrader.com/support/foru...121#post791121

        Please let me know if I may further assist
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          The orders are being placed. The problem is they are not being placed when the bar is closed but a few ticks up or down. What I want to know is if that slippage is due to the Sim data feed because surely it cannot be the same quality feed as I would pay for live?

          Comment


            #6
            Here is an example of what I am getting at. As you can see the same happens on the reverse. If it happened every execution I could try understand. Sometimes the order executes at the bar close and more often than not at least 6-8 ticks away depending on long or short.

            Comment


              #7
              Hello IndieTrader,

              Thank you for your note.

              The Simulated Data Feed connection uses fake data to mimic real-time data. The behavior you are reporting would not be due to using a Simulated Data Feed.

              If you want to further investigate this behavior, you would need to add prints to your strategy that prints the Time when you submit the order and then compare that against the execution time/bar times. If when the strategy submits the order and the order is a few ticks later, that would be seen in the prints based on the timestamp to know if OnBarClose is affecting it.

              This could be related to a slow internet connection also and the order might be taking a moment to get to the exchange which causes the order to fill at a different price. If this is the case, you could use limit orders such as EnterLongLimit() instead if you want to specify a price.

              Please see the forum link in my previous post regarding using Prints to understand the behavior of a script.

              Let us know if we may assist further.

              Brandon H.NinjaTrader Customer Service

              Comment


                #8
                Thank you Brandon

                Comment


                  #9
                  Hi Brandon. I am still getting the exact same issue and problem. It seriously affects the ability to monitor the profitability of my strategy which relies on the order being executed on bar close and not via a limit order. I am a trader not a technical coder so I do not have the abilities nor the time to learn how to put the Print statement and code into my script. I previously had an account with AMP futures and I never ever saw this problem. I think I'll have to just evaluate other platforms and vendors and data providers that are more user friendly. But thanks for your time anyway.

                  Comment


                    #10
                    Hello IndieTrader,

                    Thank you for your note.

                    Unfortunately, in the support department at NinjaTrader it is against our policy to create, debug, or modify, code or logic for our clients. Further, we do not provide C# programming education services in our support. This is so that we can maintain a high level of service for all of our clients as well as our partners.

                    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. If you would like our NinjaTrader Ecosystem team to follow up with you with a list of affiliate consultants who would be happy to create/modify this script or any others at your request, please contact vendorsupport[AT]ninjatrader.com.

                    Please let us know if we may assist further.

                    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
                    Brandon H.NinjaTrader Customer Service

                    Comment


                      #11
                      Thanks you for your reply. There is nothing wrong with the script. I was created using your strategy builder and it functions perfectly. It needs no debugging. It's not the script placing the order a few ticks and sometimes points away from the close of bar. If it was then it would happen each and every time. It's a simple crossover script. Nothing complicated. It generates a signal at crossover and at random times it places the order a few ticks or bars away from the close of bar. I have had a coder friend look at the simple script and he says there is no problem with it. You have still not given me assurance that the script will function as it should with a different live data feed. I have a 100Mbps fiber line so internet speed is not the issue.
                      Regards

                      Comment


                        #12
                        Hello IndieTrader,

                        Thank you for your note.

                        To determine why your strategy is placing orders a few ticks or bars away from when your order entry condition becomes true, you would need to debug your strategy using the instructions in post number 4 to understand the behavior of your script.

                        We cannot assure if any particular behavior will or will not happen when connected to a live data feed.

                        Let us know if we may assist further.
                        Brandon H.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by quantismo, 04-17-2024, 05:13 PM
                        5 responses
                        32 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by proptrade13, Today, 11:06 AM
                        1 response
                        5 views
                        0 likes
                        Last Post NinjaTrader_Clayton  
                        Started by love2code2trade, 04-17-2024, 01:45 PM
                        4 responses
                        34 views
                        0 likes
                        Last Post love2code2trade  
                        Started by cls71, Today, 04:45 AM
                        2 responses
                        10 views
                        0 likes
                        Last Post eDanny
                        by eDanny
                         
                        Started by kulwinder73, Today, 10:31 AM
                        1 response
                        10 views
                        0 likes
                        Last Post NinjaTrader_Erick  
                        Working...
                        X