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

Exporting indicators with a reference

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

    Exporting indicators with a reference

    Hi,

    I would like to know if there is an efficient way to export indicators or strategies that need a dll reference.

    For example I had to add the System.Design.dll reference to my indicator for a customer.
    It was a pain installing the indicator on his computer even if she had copied the System.Design.dd in her NinjaTrader custom folder before importing. We had to manually import the indicator and add the reference on her computer.

    Probably because when I added the reference to the indicator the path was different from hers. I don't know.

    But is there a way that we don't have to go through all this when we need an added reference.

    Many thanks for helping.

    #2
    Hello blar58,
    Thanks for writing in and I am happy to assist you.

    You need to add the referenced dll in the zip file along with the NinjaScript code. Please refer here for further reference.

    Please let me know if I can assist you any further.
    Last edited by NinjaTrader_Joydeep; 04-26-2012, 08:52 AM.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      OK I know now that I have to include the dll in the zip file but how do I add this dll to the zip file ?

      Sorry for my ignorance


      Thanks !

      Comment


        #4
        Hello blar58,
        Please follow the below steps to add your custom dll to a zip file:

        1. Locate your base .zip distribution package
        2. Open the .zip
        3. Add to the .zip file your assemblies and/or your DLL files to the root directory of the .zip. These files cannot be behind any extra directory structures and must be directly in the root of the .zip

        For custom assemblies, you will also need to add to the root of the .zip a .txt file called AdditionalReferences.txt

        1. Bring up the Windows Start Menu
        2. Go to the Run field and type "notepad" without the quotes and press Enter
        3. In Notepad, type the name of your custom assembly and then save the file as a text file with the name "AdditionalReferences".

        Ex: If your custom assembly's name was MyCustomAssembly.dll and MyCustomAssembly.cs, in the AdditionalReferences.txt file you would type "MyCustomAssembly" without the quotes.

        Note: If you have multiple custom assemblies to add you can append each of the assembly's names into the same AdditionalReferences.txt file on new lines



        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Thank you for your help.

          One last question I have already an AdditionnalReferences.txt file and if I open it I see the name of the reference I added : System.Design.

          Do I need to add anything else ?
          My indicator is called BMapLinetoFile.

          Here is what I have after adding the System.Design.dll in the zip file :
          AdditionReferences.txt which has System.Design.
          Info.xml
          System.Design.dll
          BMapLineToFile.cs


          Thank you

          Comment


            #6
            Hello blar58,
            The BMapLineToFile.cs file should be in the Indicator folder.

            Thus the zip file shall contain:
            AdditionReferences.txt which has System.Design.
            Info.xml
            System.Design.dll
            Indicator>BMapLineToFile.cs

            Please let me know if I can assist you any further.
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              OK got it !

              Comment


                #8
                Hello blar58,
                Thanks for your note.

                Please let me know if I can assist you any further.
                JoydeepNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by blar58 View Post
                  OK got it !
                  You may want to read Post #10 in this thread: http://www.ninjatrader.com/support/f...d.php?p=208104

                  The whole point of the .NET framework is that you should NEVER have to import or export a system component. They just need to be referenced as needed.
                  Last edited by koganam; 04-26-2012, 07:51 PM.

                  Comment


                    #10
                    I am sorry I am not sure I understand Koganam comment.

                    I need to understand something though. From my code editor I have added a reference ( right click references add ) that refers to my computer path. Even if I include the dll in the zip file once the client installs the indicator will it refers to the dll automatically because it will be unziped in the NinjaTrader Custom folder ?

                    How does it works ?


                    Thank you.

                    Comment


                      #11
                      Originally posted by blar58 View Post
                      I am sorry I am not sure I understand Koganam comment.

                      I need to understand something though. From my code editor I have added a reference ( right click references add ) that refers to my computer path. Even if I include the dll in the zip file once the client installs the indicator will it refers to the dll automatically because it will be unziped in the NinjaTrader Custom folder ?

                      How does it works ?


                      Thank you.
                      You should NEVER have to export a System component; the user should have it installed if they have the correct .NET version. A reference is exactly that: a line which identifies a component that is required for the code to function correctly. If that file is a system file, referenced from a system location, as it should be, it should not be included in any export. It might do no harm, but you never can be certain.

                      One should never leave executable code lying around on a system unless it is absolutely necessary.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by trilliantrader, 04-18-2024, 08:16 AM
                      4 responses
                      18 views
                      0 likes
                      Last Post trilliantrader  
                      Started by mgco4you, Today, 09:46 PM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by wzgy0920, Today, 09:53 PM
                      0 responses
                      9 views
                      0 likes
                      Last Post wzgy0920  
                      Started by Rapine Heihei, Today, 08:19 PM
                      1 response
                      10 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by Rapine Heihei, Today, 08:25 PM
                      0 responses
                      10 views
                      0 likes
                      Last Post Rapine Heihei  
                      Working...
                      X