Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hi, hopefully someone can help me with the Ninja issue here. when i try to import ninja scripts, i get an error saying : "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 File".
so i did the following: "Make sure that you have no *.cs files in any subfolders of bin\Custom\Indicators or bin\Custom\Strategies. Also check for any *.cs files in the bin\Custom tree whose names do not begin with the @ symbol (see also AddOns, BarsTypes, ChartStyles, etc.)."
But the error is still there? Any idea what else i can do? Thank you
Can you help answer these questions from other members on NexusFi?
Firstly, I don't know, but long ago I copied the following helpful tips by another in case I ran into issues. If someone more experienced does not chime in, I'd contact NT support.
"Please remove all indicator and strategy files that are mentioned in the error messages.
Repeat this process until there are no more error messages.
Now you can import your indicator.
Compile. "
I've moved your post on the errors you are getting from the "Introduce yourself here" thread to its own thread in the NinjaTrader section. The introduce yourself thread is only for introductions, which means probably very few people who can help you will read it there. Here in its own thread it has a better chance to be seen and responded to.
Now, as to your issue:
First, let me say that it has been a long time since I did anything in Ninja, so I hope someone with more current experience with NT will jump in if needed, since I'm operating from memory. Also, @louiswinthorpe3, it would be wise if you wait for someone else to jump in and confirm or correct what I've written below about solving your issue, just in case....
What this error message means is that you have a ninja script that you previously imported that has something wrong with it in the way it is written -- this is what is meant by "You have Custom Ninjascript Files on your PC that have programming errors." It is referring to something you imported in the past, or something that you imported and then made a change to that created a programming error.
This part is the hard part: "These Errors must be resolved before you can import a Ninjascript Archive File" This means that you have to fix whatever is wrong in whatever other ninja script before you can import anything new. Fortunately, NT does list out the indicator or strategy that has the problem. But then you've got to fix whatever is wrong, which means basically that you will need to be able to program in ninjasript, or you will have to just delete all the scripts that are mentioned in the error message.... but that may mean you kill something you don't want to kill. (Since it has some kind of error, it won't work anyway, but those are your choices.)
If you just delete all those indicators, then your new import will work, but you will need to be able to find good copies of the deleted files and import them back in, or they are gone forever, so this is a drastic remedy.
The cleanest solution is to look at the error message, note the affected indicator/strategy, and fix it before proceeding. But this is not possible if you aren't already good at writing NT code, which I assume is not the case.
So aside from the "just close your eyes and delete them" method, perhaps you could post the full message here and someone will have a suggestion. Unfortunately, these things usually require someone to look at the code of the affected indicator in order to figure out what to do, which may be a big job. Still, someone might be able to help.
The advice to contact NT support is always good advice, as they are usually excellent. So that's your other option.
Good luck.
Bob.
--------------------
(Edit: it has been a long time since I used NT, but I believe you will need to delete the .cs files for those items that have errors, because the issues they have make them unable to be compiled. I would move them somewhere else safe so I would know what I had to replace later.)
When one door closes, another opens.
-- Cervantes, Don Quixote
The quickest way I know to narrow down the "offending" script is to:
1) open the NinjaScript Editor
2) open one of the default (included) indicators (such as "SMA")
3) A list of NinjaScripts with problems will show up at the bottom of the Editor - If not, click the "Compile" button/icon
4) Find the offending Scripts in your list(s) in the right hand column of the editor by matching them with the ones that are displayed in the bottom window of the Editor, and Exclude them from Compilation
Note: The "Lists" that are displayed in the right hand column of the editor will include all scripts, in separate "Folders" whether they are Indicators, Strategies, Chart Styles, etc., etc.,
Good luck.
NinjaScript Editor
R.I.P. John Bottomley (Botts), 1956-2022.
Please visit this thread for more information.
Thank you for really clear and good explanation. I have done all the steps but the offending script is not in the list in the right hand column. So when i compile, the offending script shows up as BookmapNinjaIndicators.cs. this is what i currently use for my BM data feed. Any idea why it would not show up in the right hand column?
In fact I have managed to remove the script from compiling but this does not seem to solve the issue. So it looks like the only option is to remove it? Here is the picture of it.