I totally get what you're saying about the binding, no argument there. If I define a namespace somewhere all I have to add is a 'using' statement in my indicator/strategy. My point was that the file containing the definition will have to be included when I export my indicator/strategy. And that sucks a bit as simply packaging a DLL would be more elegant. UNLESS NinjaTrader is able to somehow extract/package the namespace and the definition implicitly - if that is possible in NT or C# then I'm not aware of it. I hope you catch what I'm saying...
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Nasty error after binding new DLL
Collapse
X
-
Originally posted by koganam View Post
I totally get what you're saying about the binding, no argument there. If I define a namespace somewhere all I have to add is a 'using' statement in my indicator/strategy. My point was that the file containing the definition will have to be included when I export my indicator/strategy. And that sucks a bit as simply packaging a DLL would be more elegant. UNLESS NinjaTrader is able to somehow extract/package the namespace and the definition implicitly - if that is possible in NT or C# then I'm not aware of it. I hope you catch what I'm saying...
-
Originally posted by molecool View Post... And that sucks a bit as simply packaging a DLL would be more elegant. UNLESS NinjaTrader is able to somehow extract/package the namespace and the definition implicitly - if that is possible in NT or C# then I'm not aware of it. I hope you catch what I'm saying...
ref: http://www.ninjatrader.com/support/f...33&postcount=6
Note how this is true, even if you use the self-contained method that I prefer. The issue is in this case not the availability of the namespace in the dll, but in the cs file that is used to contain and iterate through the running instances. It needs the namespace to be able to reference the constructor, and NT does not put anything other than the NT default namespaces in that separate, linked cs file. IOW, when you export as a dll, NT separates out the "magic code" that it sticks at the end of the indicator, that it warns us direly not to touch, and that code needs to be able to see the namespace.
The only way to get quasi-implicit recognition of entities is if you define them in the Global namespace. You know what issues that carries. Essentially, if you do as NT says to do, then you must provide that class file that carries the definition in your Global namespace, to any export that you do that needs the defined entity, whether or not you want to give away that class that is in the file..
Comment
-
Originally posted by koganam View PostYou are spot on. You must provide the namespace definition file in the export package. No implicit recognition of namespace entities. I will point you to one particular post that I wanted you to be aware of in the thread that I last referenced.
ref: http://www.ninjatrader.com/support/f...33&postcount=6
Note how this is true, even if you use the self-contained method that I prefer. The issue is in this case not the availability of the namespace in the dll, but in the cs file that is used to contain and iterate through the running instances. It needs the namespace to be able to reference the constructor, and NT does not put anything other than the NT default namespaces in that separate, linked cs file. IOW, when you export as a dll, NT separates out the "magic code" that it sticks at the end of the indicator, that it warns us direly not to touch, and that code needs to be able to see the namespace.
The only way to get quasi-implicit recognition of entities is if you define them in the Global namespace. You know what issues that carries. Essentially, if you do as NT says to do, then you must provide that class file that carries the definition in your Global namespace, to any export that you do that needs the defined entity, whether or not you want to give away that class that is in the file..
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by guillembm, Yesterday, 11:25 AM
|
2 responses
9 views
0 likes
|
Last Post
by guillembm
Yesterday, 11:58 PM
|
||
Started by junkone, 04-21-2024, 07:17 AM
|
9 responses
68 views
0 likes
|
Last Post
by jeronymite
Yesterday, 11:51 PM
|
||
Started by trilliantrader, 04-18-2024, 08:16 AM
|
4 responses
18 views
0 likes
|
Last Post Yesterday, 10:33 PM | ||
Started by mgco4you, Yesterday, 09:46 PM
|
1 response
11 views
0 likes
|
Last Post Yesterday, 09:56 PM | ||
Started by wzgy0920, Yesterday, 09:53 PM
|
0 responses
10 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 09:53 PM
|
Comment