Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 chgs to "Auto-import 1000's of contracts' meta-data (not manually)"

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

    NT7 chgs to "Auto-import 1000's of contracts' meta-data (not manually)"

    Hello,

    I got the NT7 beta and so far so good!

    Now my goal is to get 1000's of contracts into different Instrument Lists for my traders to try some serious backtesting on.

    A few months ago, I made a post about auto-importing Contract Meta-Data into instrument lists in NinjaTrader 6.5, and NinjaTrader_Ray posted about one way that this can be done, via the Instruments.txt file, at the post here:



    I was wondering two things:

    1. Does NT7 still support this?

    2. Is there an easier way to do this in NT7?

    Thanks in advance,

    ChiTrader2000

    #2
    Originally posted by ChiTrader2000 View Post
    Hello,

    I got the NT7 beta and so far so good!

    Now my goal is to get 1000's of contracts into different Instrument Lists for my traders to try some serious backtesting on.

    A few months ago, I made a post about auto-importing Contract Meta-Data into instrument lists in NinjaTrader 6.5, and NinjaTrader_Ray posted about one way that this can be done, via the Instruments.txt file, at the post here:



    I was wondering two things:

    1. Does NT7 still support this?

    2. Is there an easier way to do this in NT7?

    Thanks in advance,

    ChiTrader2000
    Yes, NT7 still supports the instrument.txt import although the format of information have have updated. No easier way to do this in NT7.
    RayNinjaTrader Customer Service

    Comment


      #3
      List of integer values of enums needed for Instruments.txt file, like Cbi.Currency?

      NinjaTrader_Ray,

      Thank you very much for the quick response. I will do it the way you suggested.

      I noticed that the Instruments file needs the integer values for different enums in the NinjaTrader.Cbi namespace, such as Currency and Exchange.

      Where can I go to see all the integer values for each enum value in the NinjaTrader.Cbi namespace, such as Currency.AustralianDollar?

      Thanks,

      ChiTrader2000

      Comment


        #4
        ///<summary>
        /// Australian dollar.
        ///</summary>
        AustralianDollar = 0,
        ///<summary>
        /// British pound.
        ///</summary>
        BritishPound = 1,
        ///<summary>
        /// Canadian dollar.
        ///</summary>
        CanadianDollar = 2,
        ///<summary>
        /// Euro.
        ///</summary>
        Euro = 3,
        ///<summary>
        /// Kong Kong Dollar.
        ///</summary>
        HongKongDollar = 4,
        ///<summary>
        /// Japanese Yen.
        ///</summary>
        JapaneseYen = 5,
        ///<summary>
        /// Swiss Franc.
        ///</summary>
        SwissFranc = 6,
        ///<summary>
        /// US dollar.
        ///</summary>
        UsDollar = 7,
        ///<summary>
        /// Korean Won.
        ///</summary>
        KoreanWon = 8,
        ///<summary>
        /// Indian Rupee.
        ///</summary>
        IndianRupee = 9,
        ///<summary>
        /// Unknown currency.
        ///</summary>
        Unknown = 99,
        RayNinjaTrader Customer Service

        Comment


          #5
          ChiTrader2000,

          Any chance you'd be willing to make your Instruments.txt available? I have 5-6 instruments that I need to move over into NT7... and obviously I could do this by hand through the instrument manager...

          But I'm never one to look a gift horse/file in the mouth. Especially if it includes other contracts I might eventually end up trading.

          Originally posted by ChiTrader2000 View Post
          NinjaTrader_Ray,

          Thank you very much for the quick response. I will do it the way you suggested.

          I noticed that the Instruments file needs the integer values for different enums in the NinjaTrader.Cbi namespace, such as Currency and Exchange.

          Where can I go to see all the integer values for each enum value in the NinjaTrader.Cbi namespace, such as Currency.AustralianDollar?

          Thanks,

          ChiTrader2000

          Comment


            #6
            Heech,

            Unfortunately I can't share my actual file, since it contains every contract my employer has ever traded, which is definitely private information.

            However, my experiences using the NinjaTrader Instruments.txt file, which you can download from the post linked to in a post in this thread, may be of some help...

            1. I found that using this file won't delete the instrument list info already in your NinjaTrader.

            2. If the product and the contract (for futures) are already listed as choices in the instrument manager but are not yet being shown under an Instrument List, they are really easy to add (I just added many 1000's automatically, included the named Instrument Lists).

            Here is how you could import some fictitious futures named A 03-08, A 06-08, B 03-08, B 06-08 into some new Instrument Lists named List A and List B..

            Find a part of the file that says

            ########### instrument lists ###########

            and make it look like this

            ########### instrument lists ###########

            List A ; A 03-08, A 06-08

            List B ; B 03-08, B 06-08

            ...Follow NinjaTrader_Ray's instructions in the post linked to in this thread, and the contracts will automatically appear underneath the Instrument Lists in the Strategy Analyzer.

            3. If the product and the contract (for futures) are not already listed as choices in the instrument manager, this will not work.

            4. I have so far been completely unable to either edit a TickSize or PointValue of a pre-existing contract or add a brand new contract as a choice in the Instrument Manager with the sample lines shown under the
            ############## futures ############## section... For instance, the following does not load the contracts L 06-03, L 09-03, etc.

            ############## futures ##############

            L ; Three Month Sterling (Short Sterling) Interest Rate Futures ;0;0; ;1;200306 ; 1250 ; 0.01 ; 3 ; http://www.liffe.com/products/stirs/...ing.htm#future ; Liffe ; ; ,-,L-I,DI,IE,LF,-,-,LFL,L,,LFL,-,,,-,-,LL,-,L
            L ; Three Month Sterling (Short Sterling) Interest Rate Futures ;0;0; ;1;200309 ; 1250 ; 0.01 ; 3 ; http://www.liffe.com/products/stirs/...ing.htm#future ; Liffe ; ; ,-,L-I,DI,IE,LF,-,-,LFL,L,,LFL,-,,,-,-,LL,-,L
            L ; Three Month Sterling (Short Sterling) Interest Rate Futures ;0;0; ;1;200312 ; 1250 ; 0.01 ; 3 ; http://www.liffe.com/products/stirs/...ing.htm#future ; Liffe ; ; ,-,L-I,DI,IE,LF,-,-,LFL,L,,LFL,-,,,-,-,LL,-,L
            L ; Three Month Sterling (Short Sterling) Interest Rate Futures ;0;0; ;1;200403 ; 1250 ; 0.01 ; 3 ; http://www.liffe.com/products/stirs/...ing.htm#future ; Liffe ; ; ,-,L-I,DI,IE,LF,-,-,LFL,L,,LFL,-,,,-,-,LL,-,L
            L ; Three Month Sterling (Short Sterling) Interest Rate Futures ;0;0; ;1;200406 ; 1250 ; 0.01 ; 3 ; http://www.liffe.com/products/stirs/...ing.htm#future ; Liffe ; ; ,-,L-I,DI,IE,LF,-,-,LFL,L,,LFL,-,,,-,-,LL,-,L
            L ; Three Month Sterling (Short Sterling) Interest Rate Futures ;0;0; ;1;200409 ; 1250 ; 0.01 ; 3 ; http://www.liffe.com/products/stirs/...ing.htm#future ; Liffe ; ; ,-,L-I,DI,IE,LF,-,-,LFL,L,,LFL,-,,,-,-,LL,-,L
            L ; Three Month Sterling (Short Sterling) Interest Rate Futures ;0;0; ;1;200412 ; 1250 ; 0.01 ; 3 ; http://www.liffe.com/products/stirs/...ing.htm#future ; Liffe ; ; ,-,L-I,DI,IE,LF,-,-,LFL,L,,LFL,-,,,-,-,LL,-,L
            L ; Three Month Sterling (Short Sterling) Interest Rate Futures ;0;0; ;1;200503 ; 1250 ; 0.01 ; 3 ; http://www.liffe.com/products/stirs/...ing.htm#future ; Liffe ; ; ,-,L-I,DI,IE,LF,-,-,LFL,L,,LFL,-,,,-,-,LL,-,L

            Hope this helps.

            My question is, does anybody know why the above won't load contracts as choices into the Instrument Manager?

            Note: I highlighted in red the only field I changed, which was the expiry, written as YYYYMM.

            Details of the problem: My Instrument Manager already has the "L" product, and many more recently dated contracts of the "L" product, but the above text does not add the contracts into the Instrument Manager, which means that trying to add these older contract months into an Instrument List via the Instruments.txt file, like the following shown below, is totally ignored:

            My Instrument List ; L 06-03, L 09-03

            Thanks in advance!

            ChiTrader2000
            Last edited by ChiTrader2000; 10-23-2009, 03:54 PM.

            Comment


              #7
              Hello all,

              Does anybody know an answer to the question in my previous post?

              Basically, while I am able to get contracts that already exist in the Instrument Manager to load into the Instrument List of my choice via the Instruments.txt auto-loading procedure by including a line like

              List A ; A 03-08, A 06-08

              I am unable to get contracts into the Instrument Manager via a line in the Instruments.txt file like

              L ; Three Month Sterling (Short Sterling) Interest Rate Futures ;0;0; ;1;200306 ; 1250 ; 0.01 ; 3 ; http://www.liffe.com/products/stirs/...ing.htm#future ; Liffe ; ; ,-,L-I,DI,IE,LF,-,-,LFL,L,,LFL,-,,,-,-,LL,-,L

              Note #1: I already have a product (not a contract with an expiry) in the Instrument Manager called "Three Month Sterling (Short Sterling) Interest Rate Futures" with a symbol of "L", and the Instrument Manager already has many contracts (product+expiry, like L 06-03) loaded for this product.

              Note #2: I highlighted in red the only field I changed, which was the expiry, written as YYYYMM.

              Has anyone ever been able to load contracts into the Instrument Manager using this file, or does it really only work for getting contracts that are already in the Instrument Manager into the Instrument List of your choice?

              Thank you very much in advance,

              ChiTrader2000

              Comment


                #8
                Guys, this definitely is beyond what we are able to provide support for.

                However, here is a hint: Please take a look at the @Rollover sections in the Instruments.txt file which define the actual expiries.

                Comment


                  #9
                  Hi NinjaTrader_Dierk,

                  OK, I understand it is not supported, so I will stop expecting NinjaTrader employees to post responses to questions on this topic. I appreciate the very valuable help that you guys have given me so far, and I understand completely.

                  Does anybody who does not work at NinjaTrader have any idea about my question below?

                  Note: The problem with the rollover month field is that it is a single integer, and is probably not the field I need to instruct NinjaTrader which contracts, going back many, many years, to load. It may help to load all 12 months (for NYMEX Energies, for instance) for a given year, but I believe that the integer includes no instructions for which time range of contract expiries to load.

                  Thank you very much in advance, and thanks again to the NinjaTrader team for all the previous help with this unsupported topic.

                  ChiTrader2000

                  Comment


                    #10
                    Please re-read my last post: you needed to look after these lines

                    @RollOver ; ES ; 0 ; 03-05,20041209 06-05,20050310 09-05,20050609 12-05,20050908 03-06,20051208 06-06,20060309 09-06,20060608 12-06,20060907 03-07,20061207 06-07,20070308 09-07,20070607 12-07,20070913 03-08,20071213 06-08,20080313 09-08,20080612 12-08,20080911 03-09,20081211 06-09,20090312 09-09,20090611 12-09,20090910 03-10,20091210 06-10,20100311 09-10,20100610 12-10,20100909 03-11,20101209 06-11,20110310 09-11,20110609 12-11,20110908

                    Comment


                      #11
                      NinjaTrader_Dierk,

                      Thanks for the tip! Everything now works great!!!

                      The reason I was confused before was that the sample Instruments.txt file that was posted at http://www.ninjatrader-support2.com/...ad.php?p=98460 does not have a @RollOver section.

                      I searched my hard drive for a file with the word "@Rollover", and found it at "C:\Program Files\NinjaTrader 7\db". Not only does it have the @Rollover section, but it has a section that allowed me to determine to custom Sessions that are available in the brand new Session Manager. I used the file at that location as the basis for my Instruments.txt file, and now I have 100% control over all aspects of my NinjaTrader meta-data via this text file. I created the text file dynamically from my company's database. NinjaTrader is now dynamically integrated into my company's meta-data!

                      Thank you very much once again for the help!

                      ChiTrader2000

                      Comment


                        #12
                        Note: don't overwrite any file in c:\program files\NinjaTrader7.

                        To make you custom Instrument.txt file effective, copy it to <my documents>/NinjaTrader7/db and restart NT: it then will be imported.

                        Comment


                          #13
                          Per NinjaTrader_Dierk's advice, DON'T overwrite any file in c:\program files\NinjaTrader7.

                          I did find that looking at the file at C:\Program Files\NinjaTrader 7\db\Instruments.txt very helpful, however, because it is an example of the newest format requirements of this file.

                          Three differences when compared to the older file that I linked to earlier in this thread are:

                          1) A @Rollover section for getting contract months into NinjaTrader

                          2) A section that allows you to import your custom sessions (new to NT7...very useful for traders that need to trade less liquid futures during a time that is shorter than the actual exchange's trading hours)

                          3) The new format of the section where you specify which products you want to import (not the months, but the product, like "Corn"). This section now has a field for the Session (hours) that the product should be traded. The old Instruments.txt file didn't. If you use the old file format, all the fields to the right side of the Session field will be misunderstood by NinjaTrader, since the fields will be offset to the left by one and will therefore be in the wrong places.

                          Hope this information is helpful to people wanting to import their own custom meta-data into NinjaTrader, instead of entering it by hand in the Session Manager and the Instrument Manager.

                          Generating the Instruments.txt file from our database of 1000's of futures going back many years has saved me at least a week of work entering data, and most likely, a handful of mistakes that would be hard to pin down that may cost another week of work debugging.

                          Thank you very much to the NinjaTrader team for yet another feature that makes NinjaTrader able to be integrated into trading environments with complex and unusual requirements.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by dcriador, Today, 12:06 PM
                          0 responses
                          6 views
                          0 likes
                          Last Post dcriador  
                          Started by dcriador, Today, 12:04 PM
                          0 responses
                          4 views
                          0 likes
                          Last Post dcriador  
                          Started by cutzpr, Today, 08:54 AM
                          0 responses
                          10 views
                          0 likes
                          Last Post cutzpr
                          by cutzpr
                           
                          Started by benmarkal, Today, 08:44 AM
                          0 responses
                          16 views
                          0 likes
                          Last Post benmarkal  
                          Started by Tin34, Today, 03:30 AM
                          2 responses
                          28 views
                          0 likes
                          Last Post Tin34
                          by Tin34
                           
                          Working...
                          X