Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Running strategies on 1 tick charts

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

    Running strategies on 1 tick charts

    Does ninjatrader struggle with 1-tick charts. I've tried running strategies and the entries are very different and I experience slippage even when using limit orders. I am using the same data sets between live and backtest

    #2
    The latter, backtesting a strategy on 1-Tick bars and running a strategy on a 1-Tick chart.

    Comment


      #3
      In the State == State.SetDefaults it is set to calculate.OnEachTick (out of curiosity, because I am running on 1-Tick bars, would there be a difference if I used onBarClose?). I do not believe I have Tick Replay enabled, how do I enable it and what does it do?

      Comment


        #4
        I set that start days to match when setting up. It takes a while to scroll back all the way on 1-tick bars, is there an easy way to verify the equivalent data. Additionally, if the conditions for taking a position only rely on the past 50 bars (say you are using a 50 SMA and a 10 SMA), on 1-Tick bars, wouldn't any differences between live and backtest even out after 50 bars?

        Comment


          #5
          Verified that the two data sets are the same. I am running the strategy on 1-tick bars because that is my desired data set. I am not planning to run this strategy on a different time frame.

          Comment


            #6
            Will do. Is this an issue you've encountered before with 1-tick charts, I do not have the same issue when operating on 1, 5, or 30 minutes charts.

            Comment


              #7
              I ran both the live and backtest over the same period with traceOrders = true, but the files are too large to upload here.

              Comment


                #8
                I added in my logic to the strategy listed in the link you sent and this was the output
                Attached Files

                Comment


                  #9
                  In following the video, when trying to run the strategy, I am not getting error from the print statements: "Strategy Error on calling OnBarUpdate method on bar 207: Index (zero based) must be greater than or equal to zero and less than the size of the argument list"

                  Comment


                    #10
                    I was able to fix the issue and run the strategy live and backtested. I am using limit orders, so it makes sense that not every trade in the backtest was completed, however, when trades do match (the order is filled on both live and backtest) I am getting a couple points of slippage of every entry and exit despite using limit orders, I have included of the comparison between live and backtest. As you can see, the first two orders with 5:00:08 and 5:00:09 entries did not have their orders filled live. The issue exists in that when an order is filled, such as the short entry at 5:00:11, I am experiencing slippage despite using limit orders. In this case there was no slippage on entry but 3/4 points of slippage on exit.
                    Attached Files

                    Comment


                      #11
                      I am using those commands to enter long and short and am including 1 bar of slippage in the backtest. My issue is with the discrepancy between fill prices

                      Comment


                        #12
                        The logic for the strategy is quite simple and should not have any discernable difference between live and backtest. This leads me to believe this is a latency issue, do you concur?

                        Comment


                          #13
                          I know what latency is. My question is, based on the information above, does it seem that latency is the issue?

                          Comment


                            #14
                            I am running this strategy on a very powerful VPS, it seems absurd that I would experience latency on the order of near points lost.

                            Comment


                              #15
                              Hello samish18,

                              You may want to give our Futures Hosting a try to reduce your latency and slippage for your backtesting strategy on both live and demo.

                              Probably you want to continue with your existing VPS and do a comparison on the performance on a month to month basis.

                              We offer 24/7 support and if you require any assistance, do not hesitate to contact our live chat.

                              tradingfxvps
                              NinjaTrader Ecosystem Vendor - tradingfxvps

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              574 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              333 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              101 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              553 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              551 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X