View Full Version : Indicator export/import broken
delta88
09-26-2007, 03:20 AM
Hello,
I don't know where to post this, but I have a serious problem with my custom indicators that I made and that I downloaded from here. It all began when I tried to export one single indicator that I made, that passed as being correct by the compiler. It didn't let me export it and quit the process with an error message, leaving me with a disabled indicator. Of course I was unable to compile a new or correct an old indicator, as it would quit with the same error messages.
I later found out, that it didn't matter what indicator I tried to export, it would always come up with the same error. I then downgraded NT6 from Version 0005 to 0004 (which I still have installed), which of course was of no use. I can delete my indicators that failed during export though, making it possible to import again, but as soon as I try to export again: same problem.
I deleted and then rebuild my whole profile with only the necessary templates, database and with only one custom indicator, but no use.
I solved the problem by deleting all files in the "bin\custom\tmp" directory and restarting the application.
Export still doesnt work :(
I have a trace log (it's in german) with these lines that I got after exporting a random indicator:
2007-09-26 09:08:55:578 WARNING: Error compiling export sources: c:\Dokumente und Einstellungen\Chefboss\Eigene Dateien\NinjaTrader 6\bin\Custom\Indicator\DinapoliStochastic.cs(55,9) : error CS0103: Der Name MIN ist im aktuellen Kontext nicht vorhanden.
2007-09-26 09:08:55:578 WARNING: Error compiling export sources: c:\Dokumente und Einstellungen\Chefboss\Eigene Dateien\NinjaTrader 6\bin\Custom\Indicator\DinapoliStochastic.cs(56,10 ) : error CS0103: Der Name MAX ist im aktuellen Kontext nicht vorhanden.
2007-09-26 09:08:55:578 WARNING: Error compiling export sources: c:\Dokumente und Einstellungen\Chefboss\Eigene Dateien\NinjaTrader 6\bin\Custom\Indicator\DinapoliStochastic.cs(56,33 ) : error CS0103: Der Name MIN ist im aktuellen Kontext nicht vorhanden.
2007-09-26 09:08:55:578 WARNING: Error compiling export sources: c:\Dokumente und Einstellungen\Chefboss\Eigene Dateien\NinjaTrader 6\bin\Custom\Indicator\DinapoliStochastic.cs(58,14 ) : error CS0118: NinjaTrader.Indicator.EMA ist ein Typ, wird jedoch als Variable verwendet.
2007-09-26 09:08:55:578 WARNING: Error compiling export sources: c:\Dokumente und Einstellungen\Chefboss\Eigene Dateien\NinjaTrader 6\bin\Custom\Indicator\DinapoliStochastic.cs(59,14 ) : error CS0118: NinjaTrader.Indicator.EMA ist ein Typ, wird jedoch als Variable verwendet.
:confused:
Delta
NinjaTrader_Dierk
09-26-2007, 04:17 AM
Apparently your installation is screwed up. I suggest starting from scratch and deleting all custom indicators and custom imports.
- uninstall NT6
- manually backup <my documents>/NinjaTrader6/bin/Custom folder to a different location
- manually remove <my documents>/NinjaTrader6/bin/Custom folder
- reinstall latest NT6
- pull up any indicator in the editor and press F5 -> should work
Note: You NEVER should manually remove/delete/rename files or folder in your NT installation unless advised by our support team.
delta88
09-26-2007, 05:59 AM
Thanks for responding that quick. I did everything you said, this time I didn't import one single indicator of my own, but downloaded a working one from the forums. Importing works, but as soon as I try to export it, it fails. I cannot even delete it, because it complains about some dependencies, which I can't see.
I have a totally fresh installation and a completely new profile folder (I deleted my old one), I even didn't use my old templates. I have no charts open, either. Just the main window.
I also opened one of my custom indicator .cs files in notepad and copied it over to the Ninjascript editor. It compiled fine, but export failed.
So still no luck. :(
Maybe it's an old registry-entry from the previous versions, that doesn't get deleted on uninstall. I ran a registry cleaner after uninstall of NT6. Or maybe files in a different folder, that interfere somehow?
I don't know. :confused:
Delta
NinjaTrader_Dierk
09-26-2007, 06:03 AM
Please repeat steps below and let me know the results. Does the random indicator you pulled up in the editor compile as expected?
Please neither import anything nor touch your registry!
NinjaTrader_Dierk
09-26-2007, 06:08 AM
Also: You only should edit NinjaScript indicators and strategies by the NT Editor and NEVER in any other editor.
Again: Only manage/edit/import/export/delete any NinjaScript object ONLY by the NT editor and the NT menu items unless advised otherwise by our support team.
delta88
09-26-2007, 06:24 AM
Please repeat steps below and let me know the results. Does the random indicator you pulled up in the editor compile as expected?
Yes, they all do. Whether its my own or the downloaded one. No errors so far. I can work with them and put them on a chart. No problem.
Please neither import anything nor touch your registry!
Normally I don't touch the registry, just this one time. I had to import one indicator though, because there were none there to compile.
This is the error message I get on export (see picture):
NinjaTrader_Dierk
09-26-2007, 06:50 AM
Please repeat all steps as per below and DO NOT IMPORT ANYTHING (as adivsed by my posts #2 and #4), but pull up e.g. the EMA indicator in editor and press F5. Does it compile?
delta88
09-26-2007, 06:57 AM
Before exporting, it would compile.
Now, after exporting, the compiler window always gives me this error message:
NinjaTrader_Dierk
09-26-2007, 07:18 AM
Our support staff will get in touch with you shortly for further assistance.
Which indicator did you try to import and export? Do you have a link or could you please attach it here?
delta88
09-26-2007, 07:32 AM
It's this one: http://www.ninjatrader-support.com/vb/showthread.php?t=3182
But it's also any other indicator, that I downloaded from here, and of course my own. I don't think they all have errors.
NinjaTrader_Ryan
09-26-2007, 07:44 AM
Hi Delta88:
Thank you for your reply.
I just sent you a PM message so we can follow up with questions about your setup. These questions may ask for secure/sensitive information about your pc that you may not prefer to post in a public forum.
Best regards,
delta88
09-26-2007, 10:59 AM
Thank you again for your help Ryan and Dierk. Uninstalling and reinstalling NET Framework 2.0 solved the problem, as suggested in the emails I received from you.
Everything works as it should.
Delta88
:p
kittyan
02-16-2008, 02:27 PM
hello,
I have the same problem. I have Vista, installed Net Framework 3.5 and doesn't work. Would you please be a bit more specific how to export strategies without the error? Strategies, indicators are ok and tested.
best regards
kittyan
file:///C:/Kriston%20Kriszti%C3%A1n/error.jpg
file:///C:/Users/KRISZT%7E1/AppData/Local/Temp/moz-screenshot.jpgfile:///C:/Users/KRISZT%7E1/AppData/Local/Temp/moz-screenshot-1.jpgfile:///C:/Users/KRISZT%7E1/AppData/Local/Temp/moz-screenshot-2.jpg
NinjaTrader_Jessica
02-16-2008, 05:17 PM
Please install Mircrosoft .Net 2.0 from the link below.
.Net Framework 2.0:
http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en (http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en)
kittyan
02-17-2008, 04:51 AM
hello,
downloaded, installed, result attached:
"error: product already installed; product is already installed as part of the operating system"
i run vista business, NT 6.5.0.8 and in the add/remove programs application net framework could not have been seen before I installed net framework from the link you advised
other tip ?
regards
kittyan
NinjaTrader_Dierk
02-17-2008, 04:54 AM
Please make sure all your indicators/strategies compile by pulling up any indicator in the editor and pressing F5.
Also: what message is in the logs?
kittyan
02-17-2008, 05:07 AM
well, I use only in-built indicators, and only strategy wizard generated strategies
message: error in compile process: value of length can not be smaller than zero. name of the parameter: length
NinjaTrader_Dierk
02-17-2008, 05:10 AM
This looks like a corrupted .NET installation. If you can't uninstall, reinstall or repair your .NET 2.0 installation then the only options left are:
- please contact Microsoft support for how to repair your .NET 2.0 installation
- your could try a system restore
kittyan
02-17-2008, 05:20 AM
thanks, some infos: I use 1 XP pro and 1 vista business and 1 vista ultimate for NT on different hardwares. Only on XP pro works exporting perfect, on both vista i have to manually copy NT's mdb file to export/import. I dont think I will make a complete system build up (rebuilding only frame 2.0 may be better) just for the elegant method of export/import strats and indicators but one last question: have you ever seen perfect working exporting on Vista ?
NinjaTrader_Dierk
02-17-2008, 05:27 AM
- the mdb file is the NT DB nad has nothing to do with NinjaScript indicators/strategies
- import/export works fine on all our Vista test machines
kittyan
02-17-2008, 12:03 PM
thanks for the answers, helped a lot ;)
grasgruen
07-23-2008, 05:34 PM
i have the same problem with my vista business german.
if i try to export a indicator which uses other system indicators, then the export fails.
on my winxp machine it asks for additionally exporting the used system indicators. thats where it seems to fail on the vista machine.
any solution yet?
thank you
NinjaTrader_Josh
07-23-2008, 10:34 PM
Are you allowing it to export with the other indicators? Also, you cannot import or export until all of your NinjaScripts are error free.
kittyan
07-24-2008, 01:23 AM
hi,
well, I don't use export/import anymore. Simply coping indicators, strats from the right folder (pc) to the right folder (other pc) and compiling them works always on all my op systems.
kittyan
NinjaTrader_Dierk
07-24-2008, 01:25 AM
You NEVER should manually copy/move/remove ANY file in NT's installation folders unless advised by our support team. This easily could result in a corrupted installation.
grasgruen
07-24-2008, 02:12 AM
all indicators compile error free.
there is no question for exporting other scripts.
when i choose a problematic indicator and click on export, instantly the error message is displayed:
Error in compile process: Die Länge darf nicht kleiner als 0 (null) sein.
this means in english: the length may not be smaller than 0.
in the log is a message for every system indicator usage in that indicator:
error CS0118: NinjaTrader.Indicator.SMA ist ein Typ, wird jedoch als Variable verwendet.
(.. is a type, but is used as a variable)
thank you
/ manuel
NinjaTrader_Dierk
07-24-2008, 02:15 AM
Pull up the indicator in question in the NinjaScript editor and press F5. Does it compile fine? If not, then please fix any error and try again.
grasgruen
07-24-2008, 02:18 AM
like i did just write: it compiles error free.
actually, its a 1:1 copy of the system indicator CCI.
same problem with Bollinger, Stochastic...
NinjaTrader_Dierk
07-24-2008, 02:21 AM
Please post the indicator file in question. You can find it in <my documents>/NinjaTrader6.5/bin/Custom/Indicators. Thanks
grasgruen
07-24-2008, 02:27 AM
ok - is attached.
but its really a 1:1 copy of CCI.
NinjaTrader_Dierk
07-24-2008, 02:45 AM
Thanks. Works here.
Christian, our export specialist, will follow up tomorrow morning.
Also: Please make sure you are on latest 6.5.1000.4.
NinjaTrader_Dierk
07-25-2008, 03:40 AM
Sorry, we're still failing to the reproduce the issue you're experiencing.
I suggest trying a fresh start:
- create a backup of your settings (if needed, File->Utilities->Backup)
- uninstall NT
- manually remove folder <my documents>/NinjaTrader6.5/bin/Custom. Note: this will remove all your custom NinjaScript files
- reinstall NT
- create a new copy of e.g. the standard SMA indicator by pulling Tools->Edit NinjaScript->Indicator->Right click->Copy and provide a new name
- try to export this freshly created copy
winja
05-18-2009, 04:03 AM
I also am getting error when I try to export an indicator I previously had been able to export. Attached is error message:
NinjaTrader_Bertrand
05-18-2009, 04:06 AM
winja, did you check into this tip from the helpguide? -> http://www.ninjatrader-support.com/HelpGuideV6/ExportProblems.html
winja
05-18-2009, 02:37 PM
Thanks Bertrand,
I get this error message CS0246;The type or namespace name 'AverageType' could not be found(are you missing a using directive or an assembly reference?)
Following the help tip when I went to File > Utilities > Export NinjaScript in the Export NinjaScript Archive File window when I searched for the SMA indicator and other moving averages(EMA, HMA, and WMA) that I used they were not located in the left hand pane so I was not able to add them to the archive File. Is there another way I can fix this problem?
NinjaTrader_Bertrand
05-19-2009, 06:28 AM
winja, please make sure you select 'System indicators' under Export objects to see those listed in the left pane (they will start with @, so @SMA, @EMA ...).
winja
05-19-2009, 09:47 AM
Bertrand, I am able to export other indicators with no problem. I am very puzzled with this. My version (6.5.1000.5) does not say 'System Indicators' but 'Indicators' only with no @ symbol to the left.
I am attaching the code as a text file. Could you try to export it on your machine. I don't think I am missing a namespace.
NinjaTrader_Bertrand
05-19-2009, 10:05 AM
For this option you would need to upgrade to 6.5.1000.10 - from your code it seems you miss the enum declaration -
public enum AverageType
{
SMA,
EMA,
HMA,
WMA,
}
Please check into this sample here - http://www.ninjatrader-support2.com/vb/showthread.php?t=3420
winja
05-19-2009, 04:44 PM
Thanks Bertrand, it is working now.