Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Importing Historical Data - Associating the Data with a Specific Contract

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

    #16
    Originally posted by NinjaTrader_BrandonH View Post
    Hello beejinator,

    Thanks for your note.

    It is likely that the data you are trying to import is not in a correct format. You would need to make sure that the data you are importing in the file is in one of the formats listed in the help guide page below.

    Understanding import file and data formats: https://ninjatrader.com/support/help...AndDataFormats
    Formatting data and formatting the file name: https://ninjatrader.com/support/help...romTickDataLLC

    Further, I see you noted that you created a single rollover date for December 2050 which will not work. You should just add the current year that some of the data exists in. For example, if the data goes up to this month add a contract for this month.

    The future instrument expects to have multiple contracts of data and to use the merge policy with offsets. If your data is already merged going back many years and isn't something to be traded on/fake instrument, it may be easier to just use a stock type instrument instead of a futures instrument.

    Let me know if I may assist further.
    Hi thanks for all these posts. Helpful. I am almost there but I can't find any forum content on my issue.

    -> I followed all the rules, got my data formatted properly for import. It is a continuous backadjusted futures contract.
    -> I set up the instrument in Instruments first, matching tick size, dollars per point, trading hours etc.
    -> I successfully import the data, but no matter what I try it gets imported as a stock. Based on NT8 website, this will occur if not Instrument is set up ahead of time. However I believe I have done this properly. The file name is 'DX2.Last' and it is a .txt file.
    -> The problem with this import is 1. no matter what I type as the trading hours in the Instrument setup, NYSE trading hours are forced. 2. The minimum price increment gets forced to 0.01 (IE 1 cent) which does not work for futures contracts.

    So that brings me to above quote.

    -> I try importing it as a stock as suggested here, but that comments out the Point Value.

    Any suggestions?

    Thank you,
    Tim


    Comment


      #17
      Hello Tim,

      Thanks for your post.

      To clarify, you created a Futures instrument for DX2 in the Tools > Instruments window before importing the historical data. Is that correct?

      If you are importing historical data for a futures or forex instrument, the instrument MUST exist in the database. If it does not, you must add it first via the Instruments window. Any data imported where the instrument does not exist in the database will automatically be imported as a "Stock" instrument type.

      It seems that your historical data file does not have an expiry month included in the file name.

      When you import historical data for a futures instrument, the text file needs to include the expiry month. Please see the link below under 'Understanding import file and data formats'.
      https://ninjatrader.com/support/help.../importing.htm

      For example:
      MSFT.Last.txt for Microsoft stock last price data
      ES 12-09.Bid.txt for the S&P E-mini December contract bid price data
      EURUSD.Ask.txt for the Euro/U.S. dollar currency pair ask price data​​

      For information about adding an instrument please see the 'Adding an Instrument" section of this help guide page: https://ninjatrader.com/support/help...e_database.htm

      Please see this help guide page that details how to import historical data from a .txt file: https://ninjatrader.com/support/help...HistoricalData
      Brandon H.NinjaTrader Customer Service

      Comment


        #18
        You definitely created your custom instrument as the "Futures" type, right? What's the error message you get when you try to import? What's the exact format of your data for each column? Important to make sure it follows the Ninjatrader requirements.

        What worked for me, importing historical tick data for NQ futures:
        • Create a new instrument named NQ_HISTORICAL, with all the settings copied from the existing NQ instrument
        • The only difference is that I added a SINGLE expiry/contract for a future expiration month (I chose December 2024)
        • I then renamed my import text file to "NQ_HISTORICAL 12-24". This is important, do NOT add .Last or .txt, it won't work. (Unfortunately NT support keeps giving the advice to name the file that way) That being said, make sure the file is saved as a text file, just don't add .txt to the file name.

        Comment


          #19
          Thanks to the two responses!

          Yes I definitely created it as a futures contract. I did it many times w same result, no way I made the same error over and over.

          BrandonH: the expiry month in the name of the txt file, matched to a single (in the far future) expiry date set up when creating the Instrument, did the trick.

          And, now the ETH trading hours are included. All good!

          Thanks so much to you both.

          -Tim



          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Jonafare, 12-06-2012, 03:48 PM
          5 responses
          3,986 views
          0 likes
          Last Post rene69851  
          Started by Fitspressorest, Today, 01:38 PM
          0 responses
          2 views
          0 likes
          Last Post Fitspressorest  
          Started by Jonker, Today, 01:19 PM
          0 responses
          2 views
          0 likes
          Last Post Jonker
          by Jonker
           
          Started by futtrader, Today, 01:16 PM
          0 responses
          8 views
          0 likes
          Last Post futtrader  
          Started by Segwin, 05-07-2018, 02:15 PM
          14 responses
          1,792 views
          0 likes
          Last Post aligator  
          Working...
          X