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

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical testing filling limit orders 1 cent off with High order fill resolution

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

    Historical testing filling limit orders 1 cent off with High order fill resolution

    I have a strategy I am backtesting and optimizing using High order fill resolution pulling in 1 tick data for the order fill process and "Fill limit orders on touch" disabled.

    With these settings I would expect near accurate fills on limit orders since we have tick data and price has to pass through our limit price to guarantee execution. (Granted live could potentially fill and not pass through).

    The problem I am seeing is that all of my limit orders are being filled 1 cent off which is simply not correct. Every sell order is being filled 1 cent higher and every buy order is being filled 1 cent lower, it's as if ninja is treating the price passing through my limit order as the execution price. See attachment.
    Attached Files

    #2
    Hello fxRichard,

    Thanks for your post.

    This is a known limitation with the NinjaTrader 8 fill engine where limit orders would have to be ticked through to simulate the fill. (The change comes from a demand to change how fills are handled "outside of a bar.") Fill Limit Orders On Touch could be used to work around this, however this will prevent slippage from being applied to Limit Orders.

    We are tracking interest behind opening up the NinjaTrader fill engine so it can be customized. I'll submit a vote for this request on your behalf so an open source solution could be created if the feature request gets fulfilled. The ticket ID is SFT-1137.

    We collect interest in feature requests before determining if the feature should be implemented. For that reason we cannot offer an ETA. Upon implementation, the number for the ticket ID can be publicly found in the Release Notes page of the help guide. I will provide a link below.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

    Please let me know if there is anything else we can do to help.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks Jim, the only problem with this is that this is not how the live market works and this can be fixed to simulate live market it's simply Ninja taking the fact that your limit order has been ticked through and taking that next price as the fill price which is wrong.

      I understand the need to change how fills are handled outside of a bar but the implementation in Ninja is off. Limit orders are designed to guarantee price, by ticking through we simply guarantee that you would have been filled at that price live (assuming your order didn't affect the market). Meaning if I'm looking to sell at 60.10 with a limit order and the price goes to 60.11 then Ninja should simulate my fill at 60.10 and not 60.11.

      To me this is a bug and not a feature request. Ninja is effectively adding 1 cent in your favor to every trade you use a limit order with and high resolution enabled.

      Comment


        #4
        Also to add to this, yes I can turn on "Fill limit orders on touch" which will fix part of the problem but this will effectively execute other orders that price does not roll through giving optimistic results and a very best case scenario which is also not ideal.

        In real life one should be able to use high order fill resolution and run the same algo with fill limit orders on touch both enabled and disabled and get live results somewhere in between.

        Comment


          #5
          Hello fxRichard,

          I agree that the observed behavior in this case is not ideal and is not expected from a user standpoint. When we brought this up to the Development team previously, we learned the behavior was expected from a programming perspective.

          The bug in this case is recognized but has been classified as a limitation. The feature request for opening up the fill engine would be the way to resolve this by allowing for different fill engine logic that does not hit this.

          I've made sure to note your concerns in the feature request ticket so the impact is further tracked.

          If there is anything else I can do to assist, I will be happy to help.
          Last edited by NinjaTrader_Jim; 08-31-2018, 11:49 AM.
          JimNinjaTrader Customer Service

          Comment


            #6
            Thanks Jim, I'm both a developer and long time trader. Just wanted to note that this "limitation" should be classified as a "bug" and that this "should" be an easy fix in order to simulate true market behavior. The current limitation is creating a situation that is impossible to happen in the live market.

            I cannot fathom why anyone that understands market dynamics would say this is "expected" from a programming perspective. I know I am only 1 customer with lifetime license but this has cost me a lot of time that I now have to look for alternatives until this is fixed.

            Comment


              #7
              Interesting note for anyone that runs across this. If I change the High order fill resolution to use 1 second instead of 1 tick I get the desired behavior which more closely resembles the true market, not adding 1 cent to your limit order fill price.

              Update: well better but not perfect.
              Last edited by fxRichard; 08-31-2018, 12:06 PM.

              Comment


                #8
                Revisiting this, this is a HUGE issue for anyone that does a lot of algo's. Backtesting and optimization when using 1 tick data for high fill resolution adds 1 tick to each execution. This can cause results to be drastically different than the live market for something so simple to fix from a programmers perspective. The simulated fill execution is simply plain wrong from Ninja's side, if I were to add 1 tick data for high fill resolution, and require the price to go through my limit price and not touch it I would expect a buy limit order at 51.50 to be filled at 51.50 if the price goes to 51.49 historically. In this scenario Ninja is requiring the price to go to 51.49 but filling me at 51.49. This is not how the market works and should be classified as a bug in my opinion.

                Comment


                  #9
                  Hello fxRichard,

                  I'm happy to send this information in with the request.

                  To confirm, you have added a 1 tick series for intra-bar granularity for fill prices (with the orders submitted to that series), and 'Fill limit orders on touch' is enabled and you are finding orders are filling 1 tick past the limit price, is this correct?
                  Chelsea B.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by edmata1109, Yesterday, 10:36 PM
                  0 responses
                  5 views
                  0 likes
                  Last Post edmata1109  
                  Started by StevenNelson, 10-11-2019, 05:51 AM
                  2 responses
                  14 views
                  0 likes
                  Last Post ManIp
                  by ManIp
                   
                  Started by TazoTodua, Yesterday, 12:29 PM
                  2 responses
                  24 views
                  0 likes
                  Last Post TazoTodua  
                  Started by sdauteuil, Yesterday, 03:16 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post sdauteuil  
                  Started by Zenersev, Yesterday, 02:11 PM
                  0 responses
                  5 views
                  0 likes
                  Last Post Zenersev  
                  Working...
                  X