• 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

How far back can data be loaded for Strategy Analyzer + Backtesting

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

    How far back can data be loaded for Strategy Analyzer + Backtesting

    Hi.

    We're testing our strategy for backtesting in the Strategy Analyzer. We're using FDAX 6-20 / 1 minute, date range is 30/04/2019 to 01/05/2020. When debugging OnBarUpdate() at CurrentBar 1 for some reason Time[0] is 20/08/2019 instead of 30/04/2019.

    Before setting up and starting the Strategy Analyzer, I was able to open a Chart for FDAX 6-20 with range 01/05/2019 to 01/05/2020, and checked it by scrolling back to 01/05/2019 and it's there.

    Is there a limit to how far back Strategy Analyzer is able to load data? Or is there a setting that I need to set?

    Thanks.

    #2
    Hello cmarkb,

    Thank you for your note.

    No, there's not a limit as to how far back the Strategy Analyzer can load data. I've tested this with an example script (just a version of the Sample MA Crossover that prints time information to the Output window) and was able to run the attached example strategy in the Strategy Analyzer for the entire time frame you mentioned. To test, please try first loading a 1 minute chart again for the dates you're testing over, then run the attached strategy in the Strategy Analyzer on a 1 minute chart of the same time frame. Your first print from the strategy should read:

    4/30/2019 12:21:00 AM - Bar 20

    Do you see this print, or does this example also print dates starting in August?

    Thanks in advance; I look forward to assisting you further.
    Attached Files
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hi Kate,
      Thanks for the reply.
      I tried out TimeTest strategy and the print out (and the resulting Chart) still started at 20/08/2019.
      I had Tick Replay checked. Would that have made the difference?
      Will try clearing out cache. I think I should've done that first.
      Last edited by cmarkb; 05-28-2020, 09:55 AM.

      Comment


        #4
        Hello cmarkb,

        Thank you for your reply.

        It's almost certainly what's causing the issue. Do you have tick data for the FDAX for the full time frame if you check under Tools > Historical Data?

        Tick replay builds the bars based on tick data, this allows NinjaTrader to build the bar as if it had seen the bar live, so depending on your data provider and how much tick data you can get from them, it would restrict your backtest to however much you can get from your provider at once. The amount of available tick data can vary by instrument as well. Who is your data provider?

        Thanks in advance; I look forward to assisting you further.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Hi Kate,

          Thanks. Yes, the tick data appears to be there. Attached some screenshot. Our provider is IQFeed.

          Click image for larger version

Name:	202005290154AM.JPG
Views:	25
Size:	39.4 KB
ID:	1102229

          Click image for larger version

Name:	202005290157AM.JPG
Views:	19
Size:	272.6 KB
ID:	1102230

          Comment


            #6
            Hello cmarkb,

            Thank you for your reply.

            In your screenshot you've expanded minute data, not tick data. I see at least some tick data is there back to the 09-19 contract, but I don't see any for 06-19 listed.

            That's going to be an issue for you, because here's what IQFeed provides as far as historical data:
            • 180 Calendar days for Tick
            • 5 - 7 + years of Minute
            • 10+ years of Daily/Weekly
            • Up to 20+ years for Monthly
            • When requesting tick data between the hours of 9:30am ET to 4:30pm ET you will have access to 8 days of historical tick data.
            Since April 30, 2019 is more than 180 days ago, you wouldn't be able to get data that far back from IQFeed. You could consider getting historical tick data from a third party provider and importing that into NinjaTrader. You can find information regarding importing data into NinjaTrader, including the necessary format for data here:

            https://ninjatrader.com/support/help.../importing.htm

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              Hi Kate,
              Ah, you're right. Yep IQfeed can only go 6 months far back for ticks.
              Thanks.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by daya123, Today, 09:16 PM
              0 responses
              2 views
              0 likes
              Last Post daya123
              by daya123
               
              Started by Wingo, Today, 04:52 PM
              1 response
              9 views
              0 likes
              Last Post bltdavid  
              Started by Bionian, Today, 10:10 AM
              3 responses
              20 views
              0 likes
              Last Post Bionian
              by Bionian
               
              Started by D Trader, Today, 01:41 PM
              0 responses
              13 views
              0 likes
              Last Post D Trader  
              Started by rexmie888, Today, 04:00 AM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_ShawnB  
              Working...
              X