Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to protect a piece of code

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

    How to protect a piece of code

    Good morning,
    I developed an Algorithm over the past few years, first with Ninja 7 and now with Ninja 8 which, in addition to providing the input signal (Long / Short) tells you, above all, when to exit (Profit / StopLoss). I was asked to sell it or use it for rent. How can I protect the algorithm I should give to others, considering that the user should be able to modify the entry condition but not see the rest of the code that manages the outputs (Profit / StopLoss). Attached the image showing the 2 Region that should not see the user (to be protected). Thank you.
    Roberto
    Attached Files

    #2
    Hello Italy,

    Thank you for the post.

    You can find directions on how to protect an export in the following link. You have a few options, you can compile the assembly which essentially just makes a dll, this is no longer user readable but is also not a protected dll. You can optionally purchase the agile.net to further protect exports.



    I look forward to being of further assistance.

    Comment


      #3
      I tried the link to figure out how to compile a non-readable version of a script but the page was not found. Is there a new link that could be posted? I don't want to have to give myself a license so generally, what is the best practice when a vendor is creating products for others but doesn't want to have to add their machine ID in order to use the script? Do most vendors just create two copies of their indicators/strategies, one without readable code that just sits for clients and one version for themselves?

      Thanks for the help.

      Comment


        #4
        Hello Ymcapital,

        Thanks for your notes.

        Please see the 'Exporting NinjaScript as Assembly' section of this help guide for information about how to protect an export.


        The link above details how to export the script as an assembly (dll) which makes the code of the script no longer user-readable but is also not a protected dll.

        You can optionally purchase the Agile.NET to further protect exports. This is noted on the help guide page linked above.

        Yes, an option could be to export the script as source files for you to be able to view and modify the script and to export the script as an assembly (dll) which could be shared with others.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          I read through that page but as a vendor, what code needs to be added to the indicator or strategy so that it can be given access only to specific machine ID's? That's the part I'm not finding documentation on.

          Comment


            #6
            Hello Ymcapital,

            Thanks for your notes.

            The vendor licensing service we provide is for members of the NInjaTrader Ecosystem only.

            If you are already a vendor, please contact our Vendor Support team directly at vendorsupport[at]ninjatrader[dor]com​ regarding your inquiry and one of our technicians will be happy to assist you with this.

            If you are not already a vendor and would like to become one, please contact info[at]ninjatraderecosystem[dot]com and one of our technicians will be happy to assist you.
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment


              #7
              Already done. Thanks Brandon.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              598 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              343 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              557 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              556 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X