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

Just to confirm, there's no way to handle tick updates during historical backtest?

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

    Just to confirm, there's no way to handle tick updates during historical backtest?

    I'm doing a chart based strategy backtest using InteractiveBrokers historical data. Am I right that the only way to test the strategy and see how it handles both tick data and the bar update is to run it against the live feed (with a paper trading account)? Or is there a way to get it to handle tick updates on the backtest with historical data?

    #2
    That is correct. You can use the Market Replay feature for forward testing, but that requires you to record live market data for the instruments you wish to test.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      That is correct. You can use the Market Replay feature for forward testing, but that requires you to record live market data for the instruments you wish to test.
      What's the best way to record multiple instruments? Is the only way to do this to open multiple charts and just let NT sit there recording?

      Will NT support tick based backtesting in the next version?

      Thx.

      Comment


        #4
        You can use the Market Analyzer to load more instruments for recording.

        Tick backtesting doesn't exist because there is no way to know how a 1min bar looks during that 1min. Even with tick data you are still missing bid/ask spread throughout that duration. This is why many people use forward testing on top of their backtesting.

        For backtesting at the tick level you could try creating a multi-time framed strategy with a 1tick bar series.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          You can use the Market Analyzer to load more instruments for recording.

          Tick backtesting doesn't exist because there is no way to know how a 1min bar looks during that 1min. Even with tick data you are still missing bid/ask spread throughout that duration. This is why many people use forward testing on top of their backtesting.

          For backtesting at the tick level you could try creating a multi-time framed strategy with a 1tick bar series.
          A multi-time framed strategy, I think I recall reading about that on here a week or so ago, that is probably what I'm looking for. I basically want to run the strategy on the bar update, but to check the price on every tick in the event that I meet my profit target before the current bar is finished. Many times the bar completes below the profit target, but there is no reason why I wouldn't take the profit earlier in the intra-bar period and just exit the position.

          Also, doesn't a tick include the bid and the ask?

          Comment


            #6
            Originally posted by NinjaTrader_Josh View Post
            You can use the Market Analyzer to load more instruments for recording.

            Tick backtesting doesn't exist because there is no way to know how a 1min bar looks during that 1min. Even with tick data you are still missing bid/ask spread throughout that duration. This is why many people use forward testing on top of their backtesting.

            For backtesting at the tick level you could try creating a multi-time framed strategy with a 1tick bar series.
            I think I see what you mean about the tick, its either going to be a bid or an ask, not both, so when checking Close[0] on the 1 tick bar series, you have no way of knowing if its the bid or ask? But during a live test you could do a call to GetCurrentBid()/Ask()? Is that sort of what you meant?

            Comment


              #7
              Your understanding is correct.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Josh View Post
                Your understanding is correct.
                I still don't quite get why if you are collecting tick data with OnMarketUpdate() you can't store whether its the bid or the ask and then provide that during historical replay? There are other tools out there that do tick based backtesting so what am I missing?

                Also I tried a multi-time framed strategy and I didn't get that far.

                Comment


                  #9
                  tradefaz,

                  OnMarketUpdate doesn't store bid / ask data, its just a method you can use to get that data real-time. In terms of backtesting, the best bet is to use the replay recorder. If you want to record data for multiple pairs without having a chart open for each, reference my post #14 @ http://www.ninjatrader-support.com/v...ead.php?t=9727

                  NT 7 will allow for historic volume, bid, ask references, as well as other things.

                  hope this helps.
                  mrlogik
                  NinjaTrader Ecosystem Vendor - Purelogik Trading

                  Comment


                    #10
                    Originally posted by mrlogik View Post
                    ...NT 7 will allow for historic volume, bid, ask references, as well as other things.
                    Will the External Data Feed Connection DLL Interface Functions have new functions to utilize these new data?
                    In other words will there be a new function VolumePlayback() added to the current bid, ask, last ...Playback() functions?

                    Thanks,
                    Gains

                    Comment


                      #11
                      Gains, I'm not aware of changes to the External Feed data interface / DLL connection, but will check with development on this and update this thread then.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Gains, to follow up - this is already supported as the Bid / AskPlayback functions for the ATI support the 'size' parameter - http://www.ninjatrader-support.com/H...unctions2.html
                        BertrandNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by xiinteractive, 04-09-2024, 08:08 AM
                        3 responses
                        11 views
                        0 likes
                        Last Post NinjaTrader_Erick  
                        Started by Johnny Santiago, 10-11-2019, 09:21 AM
                        95 responses
                        6,193 views
                        0 likes
                        Last Post xiinteractive  
                        Started by Irukandji, Today, 09:34 AM
                        1 response
                        3 views
                        0 likes
                        Last Post NinjaTrader_Clayton  
                        Started by RubenCazorla, Today, 09:07 AM
                        1 response
                        6 views
                        0 likes
                        Last Post RubenCazorla  
                        Started by TraderBCL, Today, 04:38 AM
                        3 responses
                        26 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Working...
                        X