Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do i find the problem with Historical Data

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

    How do i find the problem with Historical Data

    I have history going back over a couple of years for the instruments I'm backtesting against in the Strategy Analyzer.

    There's something wrong with my setup which causes NT to try to download the data for a particular instance whenever I backtest on that instrument.

    I use IB and often I run into a pacing violation and have to wait 10 mins.

    I had data from a vendor that I loaded into the database using HDM up to the end of March 2010.

    Just to make sure I am within this range, I set the end date to 23rd March. Every time I run the test though NT downloads the data for this instrument again.

    I have scrolled through the data in the HDM going back from the end date and found a couple of obvious gaps which I filled using the Download tab in the HDM, but this hasn't altered the constant downloading for backtesting.

    I backtest on minute data and I can see that everyday has 1425 minute entries apart from Fridays and Sundays. Sometimes I find a day with 1424 entries and I download the day again but this also has no effect.

    How do I know what data is causing the problem?

    Thanks

    #2
    NinjaTrader will always load data when any of these rules are hit: http://www.ninjatrader-support.com/H...HistoricalData

    The end date is not the only rule to pull data. Please check what you have in your HDM and compare it to the rules versus what you are pulling for your backtest dates.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      The only rule that might apply is the last:

      'The database contains no data within 3 days of the “From” date'

      Does that mean 3 days either side, before or after?

      Do Sundays' data count as days with data or not? All the forex data I use has data starting on Sundays at 22:00, so only about 1 tenth of the normal number of minutes.

      So if the provider (IB) isn't sending data to fulfill that rule, then it will always be re-requested?

      Comment


        #4
        The 3 days is for 3 or more days after the From date. If you have no data from the From date for 3 days in the HDM it will try to load data.

        Sundays would count. It will indeed always re-request if IB doesn't send that data.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I have another similar problem with historical data.

          This time I am running a backtest on yesterday's data, to make a comparison with the actual trades that the strategy executed live.

          NT will only show a chart up until 12:00. It is now past midnight and obviously the next day, i.e. 26th June now, no longer the test date. Yet NT will still only show a chart for the strategy results going up to 12:00:00 midday yesterday, and nothing for the later hours.

          [EDIT: actually now that I enter 24th June to 26th June it shows the whole day]

          I'm using hourly bars if that matters.

          I am unable to test for just one day - NT shows no trades for start and end date yesterday, i.e. zero trades when there should be 2. Same result for start date June 24th & end date 26th. Yet in the logging that I output from the strategy, it shows that it does do the trades as expected.

          [EDIT: I can also see that there is no logging - I mistook an earlier logging history for the backtest I just did.

          - could it be just because IB does not want to provide data at this time of the week. Here's the trace of NT talking to IB:

          2010-06-26 02:12:25:035 (IB) IB.HistoricalDataRequest.Send: last=26/06/2010 instrument='$USDCAD' from='2010-06-25' to='2010-06-26' period=1 M
          in splitAdjusted=False dividendAdjusted=False bars=0
          2010-06-26 02:12:25:035 (IB) IB.HistoricalDataRequest.Send: request='USD;CASH;;0;;;IDEALPRO;;CAD;;;1 min;5 D;0;BID'
          2010-06-26 02:12:26:658 (IB) IB.HistoricalDataRequest.Process: itemCount=7110 instrument='$USDCAD' from='2010-06-25' to='2010-06-26' period=1
          Min splitAdjusted=False dividendAdjusted=False bars=0
          Last edited by adamus; 06-25-2010, 07:15 PM.

          Comment


            #6
            Well I'm sorry about the garbled message but it was really late and my baby was screaming the house down. Apparently you have to be cruel to be kind when it comes to establishing sleeping patterns.

            Anyway, from one problem child to another: NT7beta - the main point in my previous message if you could understand any of it was that I couldn't get NT to produce backtest results - the Strategy Analyzer just ran as though it was going to do something, but then returned nothing. The only thing in the results that was set was the dates 24 to 26 June '10.

            I tried it connected to IB, and I tried it disconnected from IB. Nothing worked. Then I went to bed.

            Now what is really bizarre is that I left the failed Strategy Analyzer results window open on the chart which showed no trades - just yesterday's candlesticks - but this morning when I turned on my screen, the trade was there! Perfect, I thought, I was obviously just way too tired last night.

            But I switched to the Orders tab and it was empty, and then back to the chart, and the trade was gone.

            And before you even ask how you are going to reproduce this at your end, I'll tell you now I have no idea. My theory is that it's something to do with .NET and Windows 7 64bit and the way the screen painting is done. It reminds me of my other big issue at the moment with the Strategy Analyzer's properties getting mixed up when you have 2 windows open.

            Fortunately now I am able to run the analyses for the period I need (yesterday) by juggling the start date around if it doesn't work, but it's got to the point now where I am just trying to get the job done and I'm not stopping to tell you guys about the flakiness around the edges that I find on the way.

            Have you found the same kind of errors at all?

            Comment


              #7
              There are no other reports along these lines. What I suggest is to check your Control Center logs for errors. If your strategy requires extremely extensive calculations it may take awhile to plot your trades. Ultimately it depends on the strategy. What I suggest is to try using SampleMACrossOver for an idea of how it works on simple cases. Then slowly switch over to your more complex strategy and try to isolate where it begins to fail based on various code logic in the strategy.
              Josh P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              595 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              343 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              556 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              554 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X