View Full Version : Ninjascript Import Error
rtj4201
07-19-2009, 06:17 PM
I went to tools, utilities and tried to import a NinjaScript zip file. I go the following error, more than once.
You have custom ninjascript files on your pc that have programming errors. These errors must be resolved befoer you can import a ninjascript archive file.
NinjaTrader_RJ
07-19-2009, 08:01 PM
I went to tools, utilities and tried to import a NinjaScript zip file. I go the following error, more than once.
You have custom ninjascript files on your pc that have programming errors. These errors must be resolved befoer you can import a ninjascript archive file.
Hello,
Thank you for your post.
Please follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader compiles all indicators and strategies- not just one.
Open NinjaTrader
From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
Select an indicator and double click on it.
A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
At the bottom of the window a new section will appear were you can find the error locations.
From there you have the option to remove the indicator or debug it.Let me know if this does the trick for you.
rtj4201
07-19-2009, 08:26 PM
You were correct. I did a printscreen. Not sure how to correct the error. I have been using the indicator extensively. Not sure why I am getting the error.
See attached file.
NinjaTrader_Bertrand
07-20-2009, 04:11 AM
Most likely there's already a indicator with the name 'DoubleMA' present in your indicator library, try renaming before attempting to import the new one.
rtj4201
07-20-2009, 06:55 PM
Actually, if you look at the file I attached, it did not like the capital letter on the D. I replaced it with d and the compiler worked.
NinjaTrader_Bertrand
07-21-2009, 01:59 AM
Great you got it, yes NinjaScript and C# are case sensitive.
rklavohn
07-23-2009, 09:10 AM
I am trying to import a script and I am getting this error. I followed the suggested fix and it does not clear the error. It involves some UMT indicators that I have been using but am not presently using with NinjaTrader. Any other suggestions? I can not find the indictors to delete them either.
NinjaTrader_Bertrand
07-23-2009, 09:19 AM
Welcome to the forums! Most likely the addon indicators are stored in a custom assembly, best would be to contact the developer / vendor directly. If you just want to remove them, please use the File > Utilities > Remove NinjaScript assembly commend.
rklavohn
07-23-2009, 10:38 AM
I tried to use the removal tool to fix this but ended up with the same error. I tried inporting the indicators again and that did not work either. So I was able to find where the assembly was stored and took a chance that just deleting that would fix the problem which it did. I was then able to inport the indicator that I needed from another piece of software.
Thanks for the help
subterfuge
10-02-2009, 12:51 PM
Hmmm...im getting this error now.
Not knowing a thing about coding i thought id try to add an alert to an indicator bacuse unfortunately nobody here would help me. o obviuosly failed and closed it when it didn't compile. Since then I've tried to import a new indicator but get the message: "You have custom ninjascript files on your pc that have programming errors. These errors must be resolved befoer you can import a ninjascript archive file"
I took the previous advice of:
Open NinjaTrader
From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
Select an indicator and double click on it.
A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
At the bottom of the window a new section will appear were you can find the error locations.
From there you have the option to remove the indicator or debug it.
but cant find where to REMOVE the indicator,
thanks
edit: hmmm...i think ive foind how to 'delete' it now but when i try its saygin "this file is likely reference by other ninjascript files and these dependecies need to be removed first"
i dont know what that means.
NinjaTrader_Bertrand
10-02-2009, 12:56 PM
Please check into this link where all steps are discussed in detail -
http://www.ninjatrader-support2.com/vb/showthread.php?t=4678
You can delete an offending script by going to
Tools > Edit NinjaScript Indicator OR Strategy and then point to the script where the error was found and click on 'Delete'.
NinjaTrader_Bertrand
10-02-2009, 12:58 PM
edit: hmmm...i think ive foind how to 'delete' it now but when i try its saygin "this file is likely reference by other ninjascript files and these dependecies need to be removed first"
i dont know what that means.
That would mean you call the offending indicator in another script > you would need to delete the 'calling' indicator first and then you can delete the other one.
subterfuge
10-02-2009, 01:01 PM
how do i find the 'calling' indicator?
other than the indicator that i tried to do myself and messed up, there are lots of other indicators that all work fine. There's nothing else that i want to delete other than the file i names 'fg'...
NinjaTrader_Bertrand
10-02-2009, 01:07 PM
You would need to check the scripts you produced, there's unfortunately no listing of this.
subterfuge
10-02-2009, 01:23 PM
Heres what i did:
I opened 'indicator A' and copied the code. I thhen closed the window
I then opened 'indicator B' and copied the code and closed the window.
I then made a new indicator. Pasted all of the copied code in. Jiggled it around hoping to get the indicator i wanted. Obviously didn't compile. I then gave up and closed the window. Thats when the errors started.
Are you saying that I need to delete both indicators A and B (that work fine) and then delete my pile of crap that i tried to make? Im very lost. My fault for playing with things i know nothing about, but then everyone kept telling me to try it myself, lol!
NinjaTrader_Bertrand
10-02-2009, 01:32 PM
No, you only would need to delete indicators that reference / call the now faulty unfinished one you did - an easier way might be simply to comment out the full offending code script as per this document > http://www.ninjatrader-support2.com/vb/showthread.php?t=4678
If this does not do the trick for you, it might be good to install a clean copy of NinjaTrader as noted.
subterfuge
10-02-2009, 01:41 PM
thats all way beyond my abilities :(
If I reinstall ninjatrader do I lose all of the indicators ive imported over the months?
subterfuge
10-02-2009, 01:44 PM
Aha!! I think i got lucky and worked it out!!
I wont touch it again now. Gonna have to go without regarding any NT indicators that haven't already been made I guess. Gonna have to use stupid matatrader that i dont like as much, but at least they have a huge community of people who code things for you,
thanks for your help!
NinjaTrader_Bertrand
10-02-2009, 01:47 PM
You're welcome great you have it resolved - the community is ever growing here and contributions for NinjaTrader grow with this, if you haven't already checked - the sharing section is the place to go for custom scripts - http://www.ninjatrader-support2.com/vb/forumdisplay.php?f=37