NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 06-09-2008, 09:17 AM   #1
tb2000
Member
 
Join Date: May 2008
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
Default unzip failed

I've been trying to import a ZIP archive but apparently I get a message "..could not decompress the ninjascript archive..". Unzipping the file delivers correct c# code - a single file with the indicator name in the ./Indicator/ subdirectory. The ZIP file was created with winrar. Can this be done at all or do I need another approach to import an external indicator I have in source only? Or is there a tool to do this? I though I'd ask before starting to fiddle with Winzip or the like?

Thanks ahead!

tb
tb2000 is offline  
Reply With Quote
Old 06-09-2008, 09:24 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

We only support importing NS archives created by NT itself and not by any other 3rd party compressing tool.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 06-09-2008, 09:44 AM   #3
tb2000
Member
 
Join Date: May 2008
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks, that was quick :-).
So is there any way to get code you have in source only into the system?
I guess you could create some sort of template and then just paste the text for the relevant methods, not sure that's an elegant work around however?
tb2000 is offline  
Reply With Quote
Old 06-09-2008, 11:01 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Not sure I follow. You export code by File->Utilities->Export NS and import it by File->Utilities->Import NS. Please consult related docs for details.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 06-09-2008, 12:54 PM   #5
tb2000
Member
 
Join Date: May 2008
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
Default

Dierk,
basically what I have from a fellow trader is the source code for two indicators he is normally distributing as a DLL - with obfuscation etc.
There is no more access to the service that has coded his stuff so we agreed I would have a look at the code and see if I could fix certain things for him.
So, while familiar with .NET/C# but new to NT I tried to package this in a ZIP - apparently no luck as this needs to be done inside NT for NT seemingly adds some signing bytes or the like to the file.
I haven't looked further - any hint is appreciated though!
br
tb
tb2000 is offline  
Reply With Quote
Old 06-09-2008, 12:59 PM   #6
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Still not sure I follow. If you have sources and the stuff compiles ine in NT then you either
a) want to deploy sources -> File->Utilities->Export NS
b) or you want to deploy binaries only -> File->Utilities->Export NS
NinjaTrader_Dierk is offline  
Reply With Quote
Old 06-09-2008, 01:14 PM   #7
tb2000
Member
 
Join Date: May 2008
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
Default

I have sources but outside NT.
I found I can use a wizard when generating a new indicator - but thats answering lots of questions re input values etc. I am not sure about either.
I can "generate" MyCustomIndicator from Tools-NewNinjaScript as a generic startup - but I did not find how to rename that one to a specific name - as a starting point for replacing with the code I have.
So, basically, I don't want to deploy, I want to import - from an "external" source.
tb2000 is offline  
Reply With Quote
Old 06-09-2008, 02:01 PM   #8
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Can you ask the author of the sources to export them into a zip?
NinjaTrader_Ray is offline  
Reply With Quote
Old 06-09-2008, 02:04 PM   #9
tb2000
Member
 
Join Date: May 2008
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
Default

If there was no other way ???
tb2000 is offline  
Reply With Quote
Old 06-09-2008, 02:21 PM   #10
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

There is another way but not one we support.

You can try copying the indicator file to My Documents\NinjaTrader 6.5\bin\Custom\indicator

Then try and open and compile it. If it works great, if not, reverse the procedure by deleting the file.
NinjaTrader_Ray is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Login failed shawnj Connecting 2 05-20-2008 11:00 AM
Log = Failed to restore indicator Lost Trader Miscellaneous Support 5 01-14-2008 03:48 PM
Log-in Failed Quicktrader10 Installation and Licensing 1 12-08-2006 04:36 PM
Failed to execute DB job ratherBgolfing Automated Trading 7 04-14-2006 05:18 AM
Failed to Execute error werosen Miscellaneous Support 7 01-12-2006 02:57 AM


All times are GMT -6. The time now is 04:20 AM.