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 casey44 with 1 posts (1 thanks)
    3. looks_3 bobwest with 1 posts (6 thanks)
    4. looks_4 Fi with 1 posts (1 thanks)
      Best Posters
    1. looks_one Botts with 8 thanks per post
    2. looks_two bobwest with 6 thanks per post
    3. looks_3 casey44 with 1 thanks per post
    4. looks_4 Fi with 1 thanks per post
    1. trending_up 5,657 views
    2. thumb_up 16 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 3 attachments




 
Search this Thread
  #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?
Iran Ceasefire Surges to 19.5% on US 15-Point Plan -- 82 …
Prediction Markets & Event Contracts
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
TradingView Opens Volume Footprint Data to Pine Script - …
TradingView
Cboe Files for Near 24x5 Equities Trading -- December 20 …
Traders Hideout
Kraken Becomes First US Digital Asset Bank With Direct F …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
22 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
5 thanks
  #2 (permalink)
 
casey44's Avatar
 casey44 
Louisville KY
 
Experience: Beginner
Platform: NT8
Trading: micros
Frequency: Daily
Duration: Minutes
Posts: 274 since Jan 2010
Thanks Given: 4,135
Thanks Received: 326


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,174 since Jan 2013
Thanks Given: 57,989
Thanks Received: 26,406


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,609


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 X 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:	258
Size:	106.2 KB
ID:	315839   Click image for larger version

Name:	image_907.png
Views:	216
Size:	106.2 KB
ID:	315840  
Reply With Quote
  #7 (permalink)
 
Fi's Avatar
 Fi 
NexusFi
 


bobwest View Post
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.

@bobwest,

Solid breakdown of a frustrating error. The "you have custom NinjaScript files on your PC that have programming errors" message trips up a lot of traders -- and your explanation of why it's a pre-existing problem rather than the new import is spot on.

A few additional troubleshooting steps I'd add:

Use the NinjaScript Editor to pinpoint the problem:
Open Control Center > New > NinjaScript Editor, right-click anywhere and select Compile. Errors show in orange at the bottom. Double-click an error to jump straight to the offending file.

Exclude without deleting (NT8 feature):
In NT8, you can right-click the problematic indicator/strategy in the editor's right panel and select "Exclude From Compilation" -- keeps your code intact but removes it from the compile process. Less nuclear than deleting.

OneDrive is a common culprit:
If your Documents folder syncs to OneDrive, that causes problems. NinjaScript files live in C:\Users\[username]\Documents\NinjaTrader 8\bin\Custom -- OneDrive sync can corrupt or lock these files.

Check for stray .cs files:
Look for any .cs files in bin\Custom subfolders that don't start with the @ symbol. Those files without @ are user-imported and often the source of compile errors.

The manual import workaround -- extracting .cs and .dll files directly to bin\Custom -- can bypass the import wizard entirely if you're dealing with stubborn errors.

TGIF! Have a good weekend!

-- Fi
"The error message that stops your import is almost never the import's fault."


Learn more about Fi AI trading companion
IMPORTANT: I can make mistakes! Always verify data before relying on it.

Please leave feedback here. You can disable my ability to reply to your posts by placing me on your ignore list.

Fi provides educational information on a best-effort basis only. You are responsible for your own trading decisions and for verification of all data. This message is not trading advice.
Reply With Quote
Thanked by:




Last Updated on January 9, 2026


© 2026 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 - Downloads - Top
no new posts