Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Importing Historical Daily data from .txt file problem

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

    Importing Historical Daily data from .txt file problem

    Hi,
    I have created a .txt file of the S&P500 historical data (I'm backtesting using Yahoo at the mo, and that doesn't provide index historicals). The format I've used is as described by the help pages, e.g. :

    20070522;1525.1;1529.24;1522.05;1524.12;2860500000
    20070521;1522.75;1529.87;1522.71;1525.1;3465360000
    20070518;1512.74;1522.75;1512.74;1522.75;295905000 0

    I'm getting errors like: "Instrument is not supported by repository", and "Format error in line 1"...

    I've noticed that the volume format in the help pages is only a couple of digits long - so maybe that's the problem? What format does NT expect between the semicolons?

    Thanks!

    Olly

    #2
    The sample should be:
    20070522;1525.1;1529.24;1522.05;1524.12;2860500000
    20070521;1522.75;1529.87;1522.71;1525.1;3465360000
    20070518;1512.74;1522.75;1512.74;1522.75;295905000 0

    ... a stray zero crept out of place at the end!

    Comment


      #3
      Please make sure your text file follows the format exactly as in the Help Guide.

      20061023;1377.25;1377.25;1377.25;1377.25;86
      20061024;1377.25;1377.25;1377.25;1377.25;27
      20061025;1377.25;1377.25;1377.25;1377.25;24
      20061026;1377.50;1377.50;1377.25;1377.25;82


      Older dates first to newer dates last.


      Prices are all filled to the proper decimal points unlike yours.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Ah - thanks, good point!
        Having got the date order correct, and made sure price data is to 2 decimals, I get:

        SNP: Format error in line 13009: Value was either too large or too small for an Int32.: '20010917;1092.54;1092.54;1037.46;1038.77;23308300 00'

        Is this because the volume field is too large? If so, does it need to be in standard form?

        Thanks again!

        Comment


          #5
          Max value of an integer is 214783647. Your volume is greater than that.

          For this reason in NT7 we have changed volume to type long which will allow you to use volumes greater than 214783647.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Importing Historical Data - problem with .txt file

            Thanks Josh - i've adjusted the volume (by dividing by a million!) and it imports now...

            However, I've just noticed that a chart of the instrument 'skips' from 31/12/2001 to 02/01/2008 in one bar. All the other bars have imported fine (I've imported data from the S&P500 index from 1990 to 2009).

            Attached is a screen shot of the problem. I've tried reloading the data, but no joy yet.

            Any ideas?
            Attached Files

            Comment


              #7
              Please check your text file for actual data points within that time range.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Hi - yes, all the data points (daily bars) between 2001 and 2008 are there...

                Comment


                  #9
                  Tools->Historical Data->Delete your whole set and reimport something in that range. See if it shows up.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Ah. I've deleted the original and imported again under the stock name SNPTEST.txt. Nothing shows up.
                    Hmm

                    Comment


                      #11
                      SNPTEST goes to an instrument called SNPTEST. Please ensure you actually have this setup in the Instrument Manager.
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        Yes, it's there

                        Comment


                          #13
                          Not sure. Please try your other data.
                          You can also try restarting NT, reset your DB, reset your Instruments.
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #14
                            Thanks - I'll try that and let you know how it goes.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by samish18, 04-17-2024, 08:57 AM
                            16 responses
                            55 views
                            0 likes
                            Last Post samish18  
                            Started by arvidvanstaey, Today, 02:19 PM
                            3 responses
                            9 views
                            0 likes
                            Last Post NinjaTrader_Zachary  
                            Started by jordanq2, Today, 03:10 PM
                            2 responses
                            8 views
                            0 likes
                            Last Post jordanq2  
                            Started by traderqz, Today, 12:06 AM
                            10 responses
                            18 views
                            0 likes
                            Last Post traderqz  
                            Started by algospoke, 04-17-2024, 06:40 PM
                            5 responses
                            47 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Working...
                            X