PDA

View Full Version : Catch 22 -- NinjaScript with errors message


Turtle Trader
04-30-2010, 07:18 PM
Hello,

When I go to import a script, I get the following error:

===========================================

You have custom NinjaScript files on your PC that have programming errors. These errors must be resolved before you can import a NinjaScript Archive.

============================================

It does not tell me WHICH script has an error....and as far as I can tell (in the Indicator and Strategies lists), the only scripts there are the ones that Ninja Loaded.

So...I seem to be stuck.

Please advise. Thanks.

eDanny
04-30-2010, 07:40 PM
If you open an indicator for editing and just try to compile it you will see what is generating the errors listed at the bottom of the editor window.

Dan

kdoren
04-30-2010, 08:17 PM
I once had a similar problem and there was no clue as to which indicator or strategy was causing the problem. I had to export all of my custom files, then delete them all in NT7, then import and re-compile them one-by-one to figure out which one was causing the problem.

It actually did turn out to be a problem with a strategy; I was referencing something illegal during initialize(). But it appeared to work before, then started triggering errors after one of the Beta updates.

Turtle Trader
05-01-2010, 10:27 AM
Yes, that is the problem, it does not tell you which script has the error, so you are left to going through them one by one until you find the error.

I'm hoping the Ninja guys will have a better solution for this.

NinjaTrader_Josh
05-01-2010, 12:58 PM
Turtle Trader,

Not sure what you mean by going through them one by one. When you open up the NinjaScript Editor and press F5 it compiles the whole assembly. Any errors in any of your files will be listed at the same time.

If you receive the import fail error because the error is actually in the file you are trying to import you are likely trying to import an incompatible NT6.5 file into NT7. In that case then you would want to try the steps outlined here in the Migrating NinjaScript section: http://www.ninjatrader-support2.com/vb/showthread.php?t=21019

Turtle Trader
05-01-2010, 02:05 PM
OK, if that is the case then the error message is confusing. It implies that the error is in one of the existing scripts that are already imported.

It does not say that the current script that I am trying to import has a problem.

Here is the error message again...

===========================================

You have custom NinjaScript files on your PC that have programming errors. These errors must be resolved before you can import a NinjaScript Archive.

============================================

Is that telling me the script I'm trying to import has a problem, or that one or more of the scripts in the Ninja library has a problem?

Thanks

PS. Yes, this is NT7 and I am trying to import a very simple 6.5 script

NinjaTrader_Josh
05-01-2010, 06:22 PM
The error message will be the same regardless of if the error is in the zip or in your preexisting files. The import utility assumes .zips were made error free since that is the only way you can export them. Since code changes were made in 7, some 6.5 zips will not work. Please follow the steps in the link in my previous post to bring 6.5 indicators over into 7 manually.