Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Editing the Instrument database

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

    Editing the Instrument database

    Hi, over the last couple of months I have added thousands of symbols to the Instrument database using the Import Stock Symbol List utility. Problem is, now I'd like to update those instruments in bulk, and that's not really feasible using the Instrument Manager screen.

    Here are some examples:
    1. When stock symbols are imported, they aren't given company names. I would not want to enter them manually, but I can build a list of symbols and company names to update the database.

    2. I sometimes added symbols with the market set to NYSE instead of Nasdaq, and vice versa. If there was a way to view all of the symbols and markets I could update the incorrect ones.

    3. All of the symbols that I entered had the default commission of $0 and I'd like to change them to my broker's commission schedule.

    So, I noticed the text file Instruments.txt in the c:\Program Files (x86)\NinjaTrader7\db directory, and NinjaTrader.sdf, which appears to be a SQL Server database that was generated from Instrument.txt. The file timestamps are from the date of installation, but there's a current version of NinjaTrader.sdf in My Documents.

    So my questions are:
    1. If I were to recreate Instrument.txt with my 4000 symbols, is there any way to rebuild the instrument database from that text file?

    2. Is there any way to open the NinjaTrader.sdf database in SQL Server? Of course NT could not be running while applying any changes, but I would feel comfortable enough running SQL statements against the database if I could get the database open.

    3. Is there a cleanup utility that can correct the existing symbols with correct company names or markets from an external data source like Yahoo?

    4. Are there any plans to create an instrument editor set up in grid format (like a spreadsheet) so customers could edit the database?

    #2
    Hello egan857,
    Thanks for writing in and I am happy to assist you.

    1. Yes, you can recreate the Instrument.txt file with your custom symbols, though we officially do not support it.
    2. Unfortunately we do not support opening the NinjaTrader.sdf file
    3. NinjaTrader comes with a default symbol list. You can reset it anytime you want. To reset your instruments please: go to the Tools menu, select the Options menu item, select the Data tab, and then click on 'Reset Instruments'. Unfortunately there are no external sources to correct it.
    4. Unfortunately we don’t have any plans as of now, but I will send the feature request to development for further consideration.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hi Joydeep,

      Thanks for the quick response.

      That is an acceptable solution. I just want to verify before trying it that if I overwrote the C:\Program Files {86)\NinjaTrader\db\Instrument.txt file with my symbols and formatted it exactly as the original file is formatted, and then clicked on the Reset Instruments button, it would recreate the instrument database with my symbols? Also, will anything else be affected, like my NinjaScript strategies or indicators, or chart layouts? I want to make sure that hitting the button doesn't simply change EVERYTHING back to the original factory settings.

      Comment


        #4
        Hello egan857,
        The reset instrument button uses this text file. If you want to edit this file please do make sure keep a backup of the original file.

        It only affects the Instrument, Instrument List. It do not affect any NinjaScript files, chart layout etc.

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Hello egan857,
          Development has assigned tracker id #674 for your feature request.
          Please let me know if I can assist you any further.
          JoydeepNinjaTrader Customer Service

          Comment


            #6
            Hi, I'm ready to try replacing the instrument database. I have a list of symbols in exactly the same format as the securities in the default Instruments.txt file. Many of the columns in the default file are blank or dashes, and I was wondering if you had the file layout for that file so I could see if there was any other columns worth populating. If you can't get it easily or if it will take a while, don't bother.

            Comment


              #7
              Hello egan857,
              The instruments.txt is the only reference sample we currently have.

              Though we do not provide any official support, you can also place your custom instrument file in the <My Documents>\NinjaTrader 7\db\ folder, and NinjaTrader will import all the instruments as defined in the file. Please do keep a copy of it as NinjaTrader deletes the file if the import is successful.

              Please let me know if I can assist you any further.
              JoydeepNinjaTrader Customer Service

              Comment


                #8
                No worries. The import worked perfectly. Thanks for all your help.

                Comment


                  #9
                  Hello egan857,
                  Glad to know you could import it successfully.

                  Please let me know if I can assist you any further.
                  JoydeepNinjaTrader Customer Service

                  Comment


                    #10
                    Hi: I already imported a list of stocks. How can I open that list in the charting window to scroll down the list viewing the charts?

                    Comment


                      #11
                      Hello,

                      These instruments would should be added to the Default instrument list: http://www.ninjatrader.com/support/h...ment_lists.htm
                      KyleNinjaTrader Customer Service

                      Comment


                        #12
                        Hello, Can someone help me? I have a problem with the strategy. In other date the strategy will be enable but if I slide to start in other it doesn't enable no matter how I tried to enable it. Is this a database problem?

                        Comment


                          #13
                          Hello edward_bell,
                          Thanks for your note.


                          Are you able to replicate the scenario with the SampleMACrossover strategy.

                          Also please let me know the exact settings you are using while initializing the strategy.

                          Can you please send the log and trace files to support[AT]ninjatrader[DOT]com
                          • You will find the log file on your PC in the (My) Documents > NinjaTrader 7 > Log folder.
                          • The log file will be named "log.YYYYMMDD.txt"

                          • You will find the trace file on your PC in the (My) Documents > NinjaTrader 7 > Trace folder.
                          • The trace file will be named "trace.YYYYMMDD.txt"


                          Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

                          I look forward to assisting you further.
                          JoydeepNinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by bortz, 11-06-2023, 08:04 AM
                          47 responses
                          1,602 views
                          0 likes
                          Last Post aligator  
                          Started by jaybedreamin, Today, 05:56 PM
                          0 responses
                          8 views
                          0 likes
                          Last Post jaybedreamin  
                          Started by DJ888, 04-16-2024, 06:09 PM
                          6 responses
                          18 views
                          0 likes
                          Last Post DJ888
                          by DJ888
                           
                          Started by Jon17, Today, 04:33 PM
                          0 responses
                          4 views
                          0 likes
                          Last Post Jon17
                          by Jon17
                           
                          Started by Javierw.ok, Today, 04:12 PM
                          0 responses
                          12 views
                          0 likes
                          Last Post Javierw.ok  
                          Working...
                          X