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

How to export unprotected script that use protected script?

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

    How to export unprotected script that use protected script?

    Hello.
    I have indicator that must be shared only with protected code.
    Also, I have strategy, that use this indicator.

    And now I need to share with someone both indicator and strategy.
    Indicator should be protected, strategy should be open-sourced.

    How can I do this?
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Hello fx.practic,

    Thanks for your post.

    Please consider the following steps to include a protected indicator with an open source strategy distribution:
    1. Export the indicator as source code to make a back up
    2. Export the indicator as a compiled assembly
    3. Remove the indicator from your platform (Exclude dependant NinjaScripts from compilation)
    4. Import the protected indicator
    5. Build/Compile the strategy so it uses the indicator from the protected assembly
    6. Export the strategy as source code
    7. Open the zip archive and add the DLL file from the indicator export to the root of the zip


    I've included a link to our documentation on adding DLL's to a distribution package. Other distributing tips are listed here as well.

    Adding Custom Assemblies or Native DLL's - https://ninjatrader.com/support/help...esOrNativeDlls

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      I might suggest a bit easier way:

      1) in EXPORT window, add the script at first and check "Compiled assembly" (with or without protection) and export as "whatever-name".
      2) now, add your strategy to the EXPORT window (but now uncheck the "compiled") and EXPORT as "other-name".

      3) from "other-name" package, drag the "strategies" folder into "whatever-name" package.

      that's all. it's good if you include this simple "tutorial" into that DOC link too, if you find useful. (btw, NT support, please, dont say this method doesnt work before you dont test yourself and ensure this works). thnx
      Last edited by ttodua; 09-11-2018, 10:31 AM.

      Comment


        #4
        Hello TazoTodua,

        Thanks for the tip. While this may work, it is not the recommended approach and making sure a reference is included with the distribution package is advised. Taking the steps I have listed will ensure that you will not encounter errors due to duplicate class names if the compiled assembly is imported with the source code already on the platform.
        JimNinjaTrader Customer Service

        Comment


          #5
          NinjaTrader_Jim, TazoTodua sorry for delayed answer and thanks a lot for advices.
          This really helps.
          fx.practic
          NinjaTrader Ecosystem Vendor - fx.practic

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CortexZenUSA, Today, 12:46 AM
          0 responses
          0 views
          0 likes
          Last Post CortexZenUSA  
          Started by usazencortex, Today, 12:43 AM
          0 responses
          2 views
          0 likes
          Last Post usazencortex  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          168 responses
          2,262 views
          0 likes
          Last Post sidlercom80  
          Started by Barry Milan, Yesterday, 10:35 PM
          3 responses
          10 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by WeyldFalcon, 12-10-2020, 06:48 PM
          14 responses
          1,429 views
          0 likes
          Last Post Handclap0241  
          Working...
          X