NexusFi: Find Your Edge


Home Menu

 





Error importing Ninja Script


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one louiswinthorpe3 with 3 posts (0 thanks)
    2. looks_two Botts with 1 posts (8 thanks)
    3. looks_3 casey44 with 1 posts (1 thanks)
    4. looks_4 bobwest with 1 posts (5 thanks)
    1. trending_up 2,543 views
    2. thumb_up 14 thanks given
    3. group 3 followers
    1. forum 5 posts
    2. attach_file 3 attachments




 
Search this Thread

Error importing Ninja Script

  #1 (permalink)
louiswinthorpe3
amsterdam, holland
 
Posts: 3 since Apr 2021
Thanks Given: 2
Thanks Received: 0

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

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
 
  #2 (permalink)
 
casey44's Avatar
 casey44 
Louisville KY
 
Experience: Beginner
Platform: NT8
Trading: micros
Frequency: Daily
Duration: Minutes
Posts: 247 since Jan 2010
Thanks Given: 4,040
Thanks Received: 311


louiswinthorpe3 View Post
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

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. "

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,162 since Jan 2013
Thanks Given: 57,341
Thanks Received: 26,267


Hi @louiswinthorpe3,

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:


louiswinthorpe3 View Post
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

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.)


casey44 View Post
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. "

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
Reply With Quote
  #4 (permalink)
 
Botts's Avatar
 Botts 
Penetanguishene, Ontario, Canada
 
Experience: None
Platform: NinjaTrader-8
Broker: NinjaTrader Brokerage, Continuum
Trading: ZB, MES, NQ, YM
Posts: 924 since Jun 2011
Thanks Given: 4,019
Thanks Received: 3,605


louiswinthorpe3 View Post
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

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.
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
louiswinthorpe3
amsterdam, holland
 
Posts: 3 since Apr 2021
Thanks Given: 2
Thanks Received: 0

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?

Reply With Quote
  #6 (permalink)
louiswinthorpe3
amsterdam, holland
 
Posts: 3 since Apr 2021
Thanks Given: 2
Thanks Received: 0

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.

Attached Thumbnails
Click image for larger version

Name:	image_721.png
Views:	146
Size:	106.2 KB
ID:	315839   Click image for larger version

Name:	image_907.png
Views:	123
Size:	106.2 KB
ID:	315840  
Reply With Quote




Last Updated on August 7, 2021


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts