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

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:	1068
Size:	39.4 KB
ID:	1102229

          Click image for larger version

Name:	202005290157AM.JPG
Views:	1104
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:



            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 rdtdale, Yesterday, 01:02 PM
              2 responses
              15 views
              0 likes
              Last Post rdtdale
              by rdtdale
               
              Started by TradeSaber, Today, 07:18 AM
              0 responses
              7 views
              0 likes
              Last Post TradeSaber  
              Started by PaulMohn, Today, 05:00 AM
              0 responses
              10 views
              0 likes
              Last Post PaulMohn  
              Started by ZenCortexAuCost, Today, 04:24 AM
              0 responses
              6 views
              0 likes
              Last Post ZenCortexAuCost  
              Started by ZenCortexAuCost, Today, 04:22 AM
              0 responses
              3 views
              0 likes
              Last Post ZenCortexAuCost  
              Working...
              X