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!
See more
See less

Partner 728x90

Collapse

Referencing my.dll indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    #2
    Not sure what you mean. Please don't export as assembly and try again.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Umm the whole idea is to have it protected from prying eyes and from being edited. If I have a Machine ID in there to check for a valid user it needs to be compiled. Yes it works uncompiled.
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #4
        Export them together then.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          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.
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            And what is the problem with just exporting it along with all the modules?
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              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.
              eDanny
              NinjaTrader Ecosystem Vendor - Integrity Traders

              Comment


                #8
                Originally posted by eDanny View Post
                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.
                eDanny,

                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


                  #9
                  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.
                  eDanny
                  NinjaTrader Ecosystem Vendor - Integrity Traders

                  Comment


                    #10
                    Unfortunately I fail to see what the issue is with just rolling them along with the modules. If the file already exists just overwrite it.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      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.
                      eDanny
                      NinjaTrader Ecosystem Vendor - Integrity Traders

                      Comment


                        #12
                        eDanny,

                        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.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          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?
                          eDanny
                          NinjaTrader Ecosystem Vendor - Integrity Traders

                          Comment


                            #14
                            Originally posted by NinjaTrader_Josh View Post
                            eDanny,

                            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.
                            I prefer to not use that at the moment. My method should work, and it does until compiling. Why should I have to be a developer or have a site to be able to protect my code???? Nonsense. Besides, you are still skirting the issue. This is something that doesn't work, and I need to know why, or use another workaround.
                            eDanny
                            NinjaTrader Ecosystem Vendor - Integrity Traders

                            Comment


                              #15
                              eDanny,

                              Development says its not supported. As such I have already provided you with alternatives. If you are unwilling to use them then unfortunately there is nothing else I can offer you.
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by TraderBCL, Today, 04:38 AM
                              2 responses
                              16 views
                              0 likes
                              Last Post TraderBCL  
                              Started by martin70, 03-24-2023, 04:58 AM
                              14 responses
                              106 views
                              0 likes
                              Last Post martin70  
                              Started by Radano, 06-10-2021, 01:40 AM
                              19 responses
                              609 views
                              0 likes
                              Last Post Radano
                              by Radano
                               
                              Started by KenneGaray, Today, 03:48 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post KenneGaray  
                              Started by thanajo, 05-04-2021, 02:11 AM
                              4 responses
                              471 views
                              0 likes
                              Last Post tradingnasdaqprueba  
                              Working...
                              X