NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support

Miscellaneous Support Miscellaneous support issues.

Reply
 
Thread Tools Display Modes
Old 05-16-2009, 07:03 AM   #1
ryker
Senior Member
 
Join Date: Dec 2007
Location: Guernsey (UK)
Posts: 152
Thanks: 0
Thanked 1 time in 1 post
Default Import compiled assembly

Hello,
I've got a problem when trying to import a compiled assembly on a different computer.
Everything compiles ok on the computer where I wrote the scripts.

Attached is the picture of the problem.

Thanks
Attached Images
File Type: png exception.png (7.7 KB, 30 views)
ryker is offline  
Reply With Quote
Old 05-16-2009, 07:36 AM   #2
mrlogik
Certified NinjaScript Consultant
 
mrlogik's Avatar
 
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
Default

Hey ryker,

This is basically saying that you have defined a method in the compiled assembly that is the same name as a function / method on the computer you're trying to import to.

I would delete the existing TZ on the computer you're importing to (maybe back it up first), then try to import and see how it works.
"You look closely enough, you can find everything has a ... weak spot where it can break, sooner or later"

PureLogikTrading
mrlogik is offline  
Reply With Quote
Old 05-16-2009, 07:55 AM   #3
ryker
Senior Member
 
Join Date: Dec 2007
Location: Guernsey (UK)
Posts: 152
Thanks: 0
Thanked 1 time in 1 post
Default

Hi mrlogik,
Thanks for your quick answer.

The computer where I try to import this assembly has a clean install so there's nothing on it.

The enum TZ is in a namespace like UserDefinedMethods. When I tried to import it alone it works but when I try to add an indicator in the assembly, it doesn't work anymore and I got this error message. There is no definition of TZ in the indicator.

So I have no idea why I've got this duplicate message error...
ryker is offline  
Reply With Quote
Old 05-16-2009, 08:00 AM   #4
mrlogik
Certified NinjaScript Consultant
 
mrlogik's Avatar
 
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
Default

Wait... Is it in UserDefinedMethods? If it is, I don't believe that function will export.

If you tried to import it alone, its now already in there, and something when you try to add an indicator is causing the problem; or at least that is how i'm understanding it.

I would try to remove anything on the "to" computer, put the enum into the indicator itself, export that and see what happens. I know the enum is more of a global thing you want to use, but I would try it this way to understand what is going on....
"You look closely enough, you can find everything has a ... weak spot where it can break, sooner or later"

PureLogikTrading
mrlogik is offline  
Reply With Quote
Old 05-16-2009, 08:30 AM   #5
ryker
Senior Member
 
Join Date: Dec 2007
Location: Guernsey (UK)
Posts: 152
Thanks: 0
Thanked 1 time in 1 post
Default

Ok, it wasn't exactly in UserDefinedMethods but in my own namespace. So I moved it to one of my indicators that uses it and then found out that the property needs the full name to access it. Then moved it back to its old location and amended the property name with the full path to TZ. Tried export and import it and it works!

Thanks for your suggestions!
ryker is offline  
Reply With Quote
Old 05-16-2009, 08:33 AM   #6
mrlogik
Certified NinjaScript Consultant
 
mrlogik's Avatar
 
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
Default

Good job!

Sometimes the export / import can be a bit tricky
"You look closely enough, you can find everything has a ... weak spot where it can break, sooner or later"

PureLogikTrading
mrlogik is offline  
Reply With Quote
Old 05-16-2009, 08:40 AM   #7
roonius
Certified NinjaScript Consultant
 
Join Date: Oct 2008
Location: Chicago, IL
Posts: 523
Thanks: 0
Thanked 3 times in 3 posts
Send a message via Skype™ to roonius
Default

Quote:
Originally Posted by ryker View Post
Ok, it wasn't exactly in UserDefinedMethods but in my own namespace. So I moved it to one of my indicators that uses it and then found out that the property needs the full name to access it. Then moved it back to its old location and amended the property name with the full path to TZ. Tried export and import it and it works!

Thanks for your suggestions!
if you ar using your own namespace and trying to access something from it,it's helpful to include a line in the top:

using YourNameSpaceName;
roonius is offline  
Reply With Quote
Old 05-16-2009, 08:55 AM   #8
ryker
Senior Member
 
Join Date: Dec 2007
Location: Guernsey (UK)
Posts: 152
Thanks: 0
Thanked 1 time in 1 post
Default

I have that line on top already but still needed to use the full library path somehow...
ryker 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
Removing An Assembly SystemTrading Miscellaneous Support 3 03-15-2009 11:36 AM
Removing NinjScript Assembly grd974 Miscellaneous Support 1 11-26-2008 11:24 AM
remove assembly ATI user Historical NinjaTrader 6.5 Beta Threads 2 02-12-2008 11:52 AM
Importing Assembly CashCache Strategy Development 9 02-01-2008 09:37 AM
Remove Ninjascript Assembly ATI user Historical NinjaTrader 6.5 Beta Threads 1 12-29-2007 08:34 AM


All times are GMT -6. The time now is 04:27 PM.