Troubleshooting Common Import Errors in NinjaTrader
If you’re encountering issues when importing our indicators as add-ons to NinjaTrader, follow these steps to resolve common errors.
1. Error: “Files have programming issues. Errors must be resolved before importing.
This error is typically caused by corrupt or uncompiled scripts in your NinjaTrader library. To fix this:
Step-by-Step Solution:
- Open NinjaTrader Control Panel.
- Go to New > NinjaScript Editor.
- Click Compile at the top of the menu.
- If there are errors, they will be listed in an orange section at the bottom of the Editor.
- Identify the problematic files, select them, and press Delete on your keyboard.
- If the files do not delete, follow these steps:
- Go to Tools > Remove NinjaScript Assembly.
- Select the file and click Remove.
- Restart NinjaTrader to clear the cache.
- Attempt to import our add-on again.
2. Import failed. The NinjaScript Archieve File may contain duplicate method names that already exist on your PC, modify a method signature that other scripts were dependent on, or be missing a required file on either your PC or in the import archive.
Because importing NinjaScript files requires compilation of your entire NinjaScript library you will first need to resolve the errors to allow for a successful compilation.
1st Step in Resolving Errors
1. Backup NinjaScript files (Tools > Export > Backup File, ensure that “NinjaScript Files” is checked and then press the “Export” button) .
2. Open the NinjaScript Editor via the menu New > NinjaScript Editor
3. Press the “F5” key on your keyboard to compile your NinjaScript library or right click in the window and click “Compile”. A list of errors will appear at the bottom of the NinjaScript Editor along with the file name where each error is located.
4. Determine if you no longer need the NinjaScript file with the errors. If you no longer need it, skip to step 9.
5. Double click on the error message to open the NinjaScript with the errors. Try to resolve the error and recompile by pressing the “F5” key.
6. If the error still exists in this file, “comment out” some or all of the content in the OnBarUpdate() method and recompile by pressing the “F5” key
7. If errors still exist in this file, “comment out” some or all of the content in the OnStateChange() method and recompile by pressing the “F5” key
8. If errors still exist in this file, “comment out” any properties that in the “Properties” region that may be causing the problems and recompile by pressing the “F5” key
9. If errors still exist in this file, try to remove the file from compilation or delete the file (See “To remove or delete the erroneous file” instructions below)
10. If another NinjaScript file references a file you wish to delete, open the file that references the file you wish to delete and “comment out” or delete the reference
11. Repeat steps 2 through 10 for every NinjaScript that still has errors
To remove or delete the erroneous file
With NinjaTrader 8, we now have the option to remove a file from compilation but not delete it.
This means all your code is intact but is not compiled so it will not produce errors. This also means the item is not available for use until you add it back into compilation.
1. Open the NinjaScript Editor via the menu New > NinjaScript Editor
2. Highlight the NinjaScript file you wish to prevent from being compiled, Right click on it and click “Exclude from Compilation”.
3. If another NinjaScript file references the file you wish to delete, you must first remove the reference to the file you wish to delete, see step 10 above
4. You also have the option to completely delete the file as well, this is the same process as above except you would select “Remove” instead.
2nd Step in Resolving Errors
If the above procedure does not resolve all errors, you may need to reinstall NinjaTrader.
1. Backup NinjaScript files (Tools > Export > Backup File, ensure that “NinjaScript Files” is checked and then press the “Export” button) .
2. Shut down NinjaTrader
3. Uninstall NinjaTrader from the windows Control Panel Add/Remove Programs
4. Manually delete or move the folder My Documents\NinjaTrader 8
5. Reinstall the latest version of NinjaTrader from our website
3. Error: “Unhandled exception; could not find a part of the path ‘C:\Users…\OneDrive\Documents\NinjaTrader 8\tmp\import\backup'”
This error is typically caused by OneDrive managing your Documents folder, which interferes with NinjaTrader.
Watch this Step-by-Step Video
Step-by-Step Solution:
- Completely close NinjaTrader.
- Disable OneDrive Backup —
- Locate the
- Right-click and select Settings.
- Go to the Backup tab.
- Under the Documents folder, select Stop backup.
- Move the NinjaTrader 8 Folder to Your Local Drive —
- Open
- Look for the “Where are my files” icon.
- Right-click and select “Open in new window”.
- Navigate to the OneDrive location where NinjaTrader 8 is stored.
- Copy and Paste the entire NinjaTrader 8 folder into your local Documents folder.
- (Tip: Keep two windows open to easily move files between locations.)
- Perform a Soft Reinstall of NinjaTrader —
- Open
- Navigate to Programs > Programs and Features.
- Find NinjaTrader, right-click, and select Uninstall.
- After uninstalling, reinstall NinjaTrader by logging in here:
https://account.ninjatrader.com - Click Download at the bottom left corner and follow the installation instructions.
4. VPS Users: How to Provide a Machine ID
If you’re using NinjaTrader on a VPS (Virtual Private Server), we need your Machine ID to activate your license.
Step-by-Step Instructions:
- Open NinjaTrader Control Center.
- Go to Help > 3rd Party Licensing.
- In the Vendor Name field, enter: TheAlgoTrader
- In the User Defined ID field, enter a unique name (avoid numbers or special characters). – You can use your name.
- Click Submit, then Copy the Machine ID.
- Send the Machine ID and User Defined ID to:
support@thealgotrader.live
Subject Line: Machine ID
4. How to Recover a Closed Chart in NinjaTrader
Did you accidentally hit the “X” on your NinjaTrader chart, save your workspace, and now your chart is completely gone? Don’t panic! In this quick tutorial, we’ll show you step-by-step how to recover your deleted charts using NinjaTrader’s built-in Database Management feature.
Following these steps should resolve most issues. If you’re still experiencing problems, feel free to contact us at support@thealgotrader.live.