Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to distribute shared utility code?

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

    How to distribute shared utility code?

    Hi,

    I have 2 indicators that each use a set of shared helper classes.

    I want to distribute them in separate protected assemblies.

    When I create the 2 different protected assemblies, each one requires
    that I include the helper classes.

    Then if one user wants to import both indicators, they get an error that
    says something like this: 'you cannot import code that already exists',
    referring to the redundant helper classes in the protected assembly.

    Is there a way to package and distribute the code in 3 separate protected
    assemblies or in some way allow both imports?
    How do you get the export process to allow unresolved references to the
    helper classes so it does not require the inclusion of the helper classes
    when the indicator assemblies are exported?

    Thanks for any help,
    Gary

    #2
    Gary,

    Unfortunately this will not be possible. If you want separate assemblies you will need to just roll your helper functions directly into the script or rename the helper functions so each one uses separate ones.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      dll dependencies?

      I have not done this, but isn't there a way to specify 3rd party dlls that your code depends on and by doing this, the protect assembly step allows you to continue without actually resolving those references?

      Is there a way to create a dll of my helper code and then when I create the indicator assembly, I would specify it like I would a 3rd party dll?

      Gary

      Comment


        #4
        GaryAlbers,

        You could try using one of those "using _____" lines at the very top of your script to reference such a DLL.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Helper functions/indicators

          When an assembly requires another indicator, is there a way to have it included, but not appear in the list of indicators available for a chart on the users PC?

          Comment


            #6
            BradB,

            If you had helper functions and such you can try adding it to the UserDefinedMethods file instead of creating an indicator for it.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks Josh, but if I need to include an indicator, is there a way to conceal it's presence?

              Comment


                #8
                Unfortunately not. You will not be able to hide it from the UI list.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by kiffgj, Today, 04:23 AM
                0 responses
                10 views
                0 likes
                Last Post kiffgj
                by kiffgj
                 
                Started by Lando Calrissian, Today, 07:30 AM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by lismartin, Yesterday, 04:47 PM
                1 response
                15 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by facuevasm, Today, 07:28 AM
                3 responses
                13 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by ballston, Today, 06:32 AM
                0 responses
                8 views
                0 likes
                Last Post ballston  
                Working...
                X