Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

missing a using directive

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

    missing a using directive

    Hello-

    I installed 'Google backup and sync', which is a cloud b/u, and decided to put my Indicators folder, the one which holds all my .cs files, in there to back it up.

    I edited an indicator and after I compiled nearly every one of the indicators I made threw an error like "The type or namespace name '<name>' does not exist in the namespace 'NinjaTrader.Indicator' (are you missing an assembly reference?)"

    I realized the .cs files were backed up in Google backup, so I removed the folder from there and restarted NT8.0.13.1. After I did some more editing I compiled and the same errors showed up.

    It feels like the backup confused NT and now it doesn't know to look in the Indicators folder for the .cs files.

    Everything worked fine before this backup.

    How do I put this back to the way it was?

    Thank you.

    #2
    Hello imalil,

    The location of NinjaTrader folders and files cannot be moved.

    Its possible to redirect the entire Documents folder and then uninstall / re-install NinjaTrader to point to this new Documents location, but after doing this the path to referenced dll files must be manually removed and re-added.

    I would like for a member of our support to assist during our normal support hours.

    Please send an email to platformsupport [at] ninjatrader [dot] com. In the email please include a link to this forum thread.


    That said, we never recommend allowing a syncing service to sync NinjaTrader folders or files. This will lock files from NinjaTrader and can cause NinjaTrader to crash.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello, Chelsea-

      To be clear, I know not to move any NT files and I did not do that. I was merely backing up my indicators. I simply made a copy of the indicators and put it in the cloud backup; at no time did I move anything from the indicator folder. I never thought Ninjatrader would look in another folder for files.

      When the error happened I quickly removed the folder from backup. Now it's telling me to recompile everything and I don't know what to do because all my cs files are in the correct folder and never left that folder in the first place.

      I just reinstalled 8.0.13.1 and got the attached error on startup.

      Is there any way to put this back to normal and not lose a day?

      Thanks.
      Attached Files

      Comment


        #4
        Hello imalil,

        This would depend on what the issue is.

        Please follow the instructions below to see where the errors are coming from after compiling an indicator in NinjaTrader 8. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.
        • Open NinjaTrader
        • From the Control Center click the New menu -> select NinjaScript Editor
        • On the right open a script such the Indicators -> ADL script
        • Right click in the window and select Compile to compile all scripts
        • At the bottom of the window a new section will appear where you can find the error locations.
        • From there you have the option to comment out offending code sections, remove the complete indicator or debug it to be able to compile again.

        If you are unsure as to what the error is indicating, please send me a screenshot of the error with the error column fully expanded so that I may read the entire error message.
        (Click and drag on the small faint separator between column heads to expand that column)

        To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

        Click here for instructions

        Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

        Click here for detailed instruction
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello, Chelsea-

          All of the indicators I made, that have always worked perfectly, are not working. One in particular, 'avtrsize1', gives me the corrupt error in attachment1. Attachment2 shows the error when I delete the indicator. So there's no way to win.

          Attachment3 shows the log, where none of my indicators are found.

          I edit my indicators every day. The only thing I did differently yesterday was backup the Indicators folder to the Google backup and sync cloud. Then this started.

          All my indicators are sitting in the Indicator folder in the exact same condition as they were on Friday, when they all compiled fine.

          How do I put this back to the way it was?
          Attached Files

          Comment


            #6
            Hello imalil,

            The messages are saying that the there is a file that is corrupted that cannot be loaded.

            Are you able to open this file or any of the other indicators in notepad?

            Documents\NinjaTrader 8\bin\Custom\Indicator

            Are you able to see these indicators in the indicators list from a chart?

            Is the avtrsize1.cs backed up on the cloud server?

            If you download a copy from the server and replace the one in NinjaTrader are you able to compile?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              -None of the cs files are backed up to the cloud server. The cloud server isn't even open.
              -The indicator opens fine in notepad. It always has, nothing has changed about the indicator.
              -All my indicators are gone from the chart indicator list. They are only found in the editor and the indicator cs folder.
              -The avtrsize1.cs indicator is not backed up to the cloud, but it's backed up on a separate drive. It has been like this for years with zero problems, so please don't say that's the problem. I've copied this file to Ninjatrader and it does not compile. As you can see from the attachment I sent, it won't let me delete it.

              I maintain there is nothing wrong with any of my files since they all worked Friday and these problems started after a cloud backup.

              You must have seen this behavior before. How was it fixed? Give me the most likely fixes to this problem so I can see if one of them works. Please.

              Comment


                #8
                Hello imalil,

                You could try generating a new settings folder in Documents and copying the indicators to the new settings folder.

                This is done by renaming Documents\NinjaTrader 8\ to Documents\NinjaTrader 8.original\ and then running the repair from the installer.

                Below is a public link to the downloads page.


                The indicators will be located in Documents\NinjaTrader 8.original\bin\Custom\Indicator.
                Move these to Documents\NinjaTrader 8\bin\Custom\Indicator
                Then compile in NinjaTrader.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  I did this, added my indicators, but I have to do a lot of rebuilding of my charts, which is difficult.

                  What would happen if I loaded last week's NT backup and only replaced the indicator part? Would that be a simple thing or would I have to keep redoing everything?

                  Comment


                    #10
                    Under tools>instrument list I had a custom list that I made. Now that I'm redoing everything I can't find it. How do I get this back?

                    Comment


                      #11
                      Hello imalil,

                      The Database file will contain your instrument lists. You could import this from your backup separately from other items.

                      You could also try loading last weeks backup, and then copying over your more recent indicators. (Please make sure to have the current indicators folder copied to a safe location so it does not get overwritten by the backup.) However, if there are implementation changes between the recent indicators and the versions saved in a previous workspace from the backup, you might have to look into fixing any affected charts.

                      We'll be happy to assist you further as needed.
                      JimNinjaTrader Customer Service

                      Comment


                        #12
                        Where can I find the database file? When I reinstalled I was told to go too far back, Ninjatrader 8.original, which is causing me to do a lot of rebuilding.

                        If I go to the Ninjatrader 8.original folder, where can I find the database file so I can copy/paste into the Ninjatrader 8 folder?

                        And if the only way to get my instrument list is to go to a backup, how do I do this: "You could import this from your backup separately from other items." I don't know how to get a portion of a backup.

                        Could you tell me the steps?

                        Thank you.

                        Comment


                          #13
                          Hello imalil,

                          The database file can be found under Documents/NinjaTrader 8/db/NinjaTrader.sdf.

                          When restoring from backup, tick boxes will be available for each item that is incorporated with the backup. Only having one tick box selected for Database will only import the database file into your platform.

                          Instructions for restoring from a backup can be found here: https://ninjatrader.com/support/help...up_archive.htm

                          If there is anything else we can do to help, please let us know.
                          JimNinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Barry Milan, Today, 10:35 PM
                          2 responses
                          9 views
                          0 likes
                          Last Post Barry Milan  
                          Started by WeyldFalcon, 12-10-2020, 06:48 PM
                          14 responses
                          1,428 views
                          0 likes
                          Last Post Handclap0241  
                          Started by DJ888, Yesterday, 06:09 PM
                          2 responses
                          9 views
                          0 likes
                          Last Post DJ888
                          by DJ888
                           
                          Started by jeronymite, 04-12-2024, 04:26 PM
                          3 responses
                          41 views
                          0 likes
                          Last Post jeronymite  
                          Started by bill2023, Today, 08:51 AM
                          2 responses
                          16 views
                          0 likes
                          Last Post bill2023  
                          Working...
                          X