If you're trying to add a new indicator to NinjaTrader and you get the following error message:
You have custom NinjaScript files on your PC that have programming errors. These errors must be resolved before you can import a NinjaScript Archive File.
the solution can be quite technical. The problem is more than likely a problem that was in place before you tried adding the new indicator. That is, it's not the new indicator that's creating the problem, but preexisting errors that weren't detected until you tried to install something new. You can confirm this by trying to install a different indicator and see if you get the same problem. NinjaTrader needs to have all indicators working properly before you can add a new one, so you need to get everything working properly before you can add a new indicator.
Sometimes the easiest way to get NinjaTrader working properly is to remove and reinstall the entire application. Only brand new NinjaTrader users would want to consider this option, as you would potentially have to reinstall all of your indicators and recreate all of your charts if you reinstall.
But NinjaTrader stores information not just in the Program Files X86 folder, it also stores content in a NinjaTrader8 folder within your My Documents folder. One of the things it stores there is custom code, in the following directory: C:\Users\username\Documents\NinjaTrader 8\bin\Custom. (You'll want to replace "username" in that file path with your windows login id.)
Many times, this error is caused by the accidental removal of a .dll file. A protected indicator usually has a .cs file and a .dll file, both of which must be available for the indicator to work properly. The error above will likely appear if the .cs file is still present, but the .dll file is missing in the Custom directory. Sometimes, restoring that .dll file from the original indicator.zip file will resolve the issue.
The easiest way to resolve this error is to figure out which custom indicator is causing the problem. There are some steps you can take to zero in on the cause of the error. It will take some technical know-how, and if you're not comfortable with the suggested steps, you may want to contact NinjaTrader support for assistance in walking through these steps to find the custom indicator that's creating this error. If you're sufficiently technical, NinjaTrader provides suggested steps in identifying which .dll file is missing, and if you don't have it, how to remove the reference to it so the problem goes away.
Note that ultimately, you'll need to open the NinjaTrader Editor window and right-click on the background to select Compile (or just hit the F5 key when the editor is selected). If you hear a tone without any errors appearing near the bottom of the editor window, then your problem may be resolved.
NinjaTrader Customer Service's steps to resolve indicator programming errors
NinjaTrader's response is included in bold, below. It assumes that you already know that x.dll is the source of the error.*
The compile error you are seeing in the NinjaScript Editor indicates you are missing a reference to the x.dll file in your installation or the x.DLL file does not exist in your installation.
Please follow the steps below to rectify the errors.
- From the Control Center please select New--> NinjaScript Editor
- In the NinjaScript Editor please right click and select References.
- In the Reference window look for the .DLL file reference in the compile error by name (in the error the file name has a .cs at the end)
- If you see the .DLL file reference please left click on the reference and select Remove
- If you removed the reference in the previous step or you do not see the .DLL file reference then please select Add
- The Add option will open a File Explorer, from the path that was opened please locate the .DLL file
- If you find the .DLL please left click to select it and then select Open--> then select OK in the References window--> then right click in the NinjaScript Editor--> select Compile
- If you do not find the .DLL in the File Explorer please close the File Explorer and References windows--> then navigate to Documents\NinjaTrader 8\bin\Custom on your PC--> and delete the .cs file referenced in the compile error--> then right click in the NinjaScript Editor--> Compile
If you would like NinjaTrader's assistance with the steps provided please email PlatformSupport@NinjaTrader.com and describe the issue so they can schedule a remote support session to troubleshoot this issue further.
*You can sometimes find the error or a hint at which .dll is causing the problems by Compiling in the editor (see instructions above on how to do that), or via an error entry in the Log tab in the NinjaTrader Control Center. Note that if you're missing a .DLL file and you're unable to locate it in a .zip file or elsewhere, then you may be able to remove the corresponding .cs file and then execute the Compile function again to get NinjaTrader ready to accept new indicators once again.):
Once you resolve the pre-existent programming errors, then you should be able to install the new indicator.
You can find NinjaTrader's information listed above along with some additional info at the following NinjaTrader Support Forum link: https://ninjatrader.com/support/forum/forum/ninjatrader-8/platform-technical-support-aa/93585-error-you-have-custom-ninjascript-files-on-your-pc
Comments
0 comments
Article is closed for comments.