The error is: The name 'XYZsample' does not exist in the current context. XYZsample being the public bool from my custom UserDefinedMethods assembly. Adding the assembly as a Reference makes no difference. Is it because the indicator is not referenced by name like normal? How can I make this work somehow or is it impossible to do in this way?
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
Referencing my.dll indicator
Collapse
X
-
Referencing my.dll indicator
I have copied/renamed the UserDefinedMethods, which I have read will not export. In my new version I have added several tests that other indicators have to pass in order to run. I copied this to another computer and exported as a .dll assembly. Then I deleted the original .cs file and imported the assembly. The next step is to import one of the indicators that will take the test but it will not compile because evidently it can't see the assembly.
The error is: The name 'XYZsample' does not exist in the current context. XYZsample being the public bool from my custom UserDefinedMethods assembly. Adding the assembly as a Reference makes no difference. Is it because the indicator is not referenced by name like normal? How can I make this work somehow or is it impossible to do in this way?Last edited by eDanny; 06-09-2009, 07:28 AM.Tags: None
-
Still missing my point. I wanted one central indicator for the checks and all others to be added as modules as needed. Therefore they cant be exported as one package. Why is the issue being danced around?I dont need a quick workaround, I want a real answer. This should be easy and straightforward but it eludes me. Not surprising since I'm not much of a programmer but that is why I have to ask these questions.Last edited by eDanny; 06-09-2009, 08:20 AM.
Comment
-
The problem is I would add indicator modules as developed, people would only install what they wanted to use, very simple idea. Every indicator module, no matter when added, should be able to check that modified UserDefinedMethods indicator. It look like I'll have to instead use a dummy indicator that can be referenced by name. Grrrr.
Comment
-
Originally posted by eDanny View PostThe problem is I would add indicator modules as developed, people would only install what they wanted to use, very simple idea. Every indicator module, no matter when added, should be able to check that modified UserDefinedMethods indicator. It look like I'll have to instead use a dummy indicator that can be referenced by name. Grrrr.
are you are trying just to export separate methods not indicators?
If yes, then I believe you will have to wait until NT7, which will be based on .net3.5 and we will be able to use "class extensions"
Comment
-
All different indicators that would use the UserDefinedMethods to check for validation, trial expiration, or whatever. Once the renamed UserDefinedMethods file is compiled and then imported, indicators can't see the public bools in it and will not import. It's a very simple concept. One indicator checks the machine and all other indicators check that indicator.
Comment
-
Ok you are saying with every indicator I should include the custom UserDefinedMethods indicator too when I export them as assemblies?
That wont work because that indicator would have specific info about the user. I need all the other indicators to be identical for all users which isn't possible when rolling it in with them. Other wise I would have to have a full suite of indicators customized for every person using them and that is the problem. At that point there is no need for the extra file since each indicator would be coded for each individual. That is not going to happen.Last edited by eDanny; 06-09-2009, 10:06 AM.
Comment
-
Maybe to clarify:
User One has custom UserDefinedMethods with his MachineID.
User One downloads indicators "A", "B", and "D".
Indicators "A", "B", and "D" check with the custom UserDefinedMethods and confirms MachineID and then work properly.
User Two has custom UserDefinedMethods with his MachineID.
User Two downloads indicators "A", "B", "C", "E", and "F".
Indicators "A", "B", "C", "E" and "F" check with the custom UserDefinedMethods and confirms MachineID and then work properly.
Indicators "A", "B", "C", "D", "E" and "F" are identical for all users but will only work on their machine.
Great, works superbly until compiling as assemblies. Without compiling, all the code is exposed. See the problem?
Comment
-
Originally posted by NinjaTrader_Josh View PosteDanny,
Why would it be different for everyone? If you want to check peoples machine IDs I suggest you send an email to sales [at] ninjatrader [dot] com and inquiry them about the vendor licensing service.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by CortexZenUSA, Today, 12:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:53 AM
|
||
Started by CortexZenUSA, Today, 12:46 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:46 AM
|
||
Started by usazencortex, Today, 12:43 AM
|
0 responses
5 views
0 likes
|
Last Post
by usazencortex
Today, 12:43 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
168 responses
2,265 views
0 likes
|
Last Post
by sidlercom80
Today, 12:05 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
11 views
0 likes
|
Last Post Yesterday, 11:58 PM |
Comment