• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Show code for customers only

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

    Show code for customers only

    Friday I wrote to NT Support asking how to protect my code so it shows only to my paying customers. I never received a response.

    I was told by a friend that there is a line of code that can be added so that the indicator checks my database of paid clients that are authorized to use my indicator. Please help me get this information.

    #2
    Hello casabella,

    If you have not received an auto-response that your message was received, this may indicate that our support emails are being blocked by firewalls/spam filters. If this is the case please unblock NinjaTrader by adding platformsupport [at] ninjatrader [dot] com to your list of safe senders and also add platformsupport [at] ninjatrader [dot] com as a contact in your address book so we may better assist you.

    Please try sending a new email to platformsupport [at] ninjatrader [dot] com from your personal email. (Instead of sending from the platform)


    You can export your code as an assembly (.dll) to prevent this code from being read or modified, and optionally you can use Agile.NET to prevent the code from being un-assembled (deobfuscated).

    All links below are publicly available.

    If you are exporting the script as an assembly any references to any dll files in NinjaTrader will be included with the exported file. This includes any 3rd party assemblies.
    Or if you are exporting an open source script and this open source script is using a referenced dll, this would also cause NinjaTrader to include references to all dlls with the export including 3rd party assemblies.

    For this reason I suggest you have a separate NinjaTrader 8 folder in (My) Documents that you can use for development that will not have the assemblies that you are using in your trading environment.

    To create a clean temporary NinjaTrader folder:
    1. Shutdown NinjaTrader
    2. Rename (My) Documents\NinjaTrader 8\ to (My) Documents\NinjaTrader 8.original\
    3. Download the NinjaTrader installation package from the link below
      http://ninjatrader.com/GetStarted
    4. Run the repair from this (if the repair is unsuccessful, uninstall and then re-install NinjaTrader)

    This will recreate the NinjaTrader 8 folder in (My) Documents.

    Copy open source script from the original environment from the Custom\<script type>\ folder.
    • (My) Documents\NinjaTrader 8.original\bin\Custom\Indicator

    To the new clean environment
    • (My) Documents\NinjaTrader 8\bin\Custom\Indicator

    Compile the script.
    1. Open NinjaTrader
    2. From the Control Center click the New menu -> select NinjaScript Editor
    3. On the right open a script such the Indicators -> ADL script
    4. Right click in the window and select Compile to compile all scripts
    5. At the bottom of the window a new section will appear where you can find the error locations.
    6. From there you have the option to comment out offending code sections, remove the complete indicator or debug it to be able to compile again.

    Once the script is compiled and there are no compile errors, export the script.
    1. Click Tools -> Export -> NinjaScript...
    2. Optionally, to export a closed source assembly dll check the box labelled 'Export as compiled assembly'
    3. If you have Agile.NET installed and would like to use this, check the box labelled Protect compiled assembly
    4. Click the 'add' link -> check the box(es) for the script(s) you want to include
    5. Click the 'Export' button
    6. Enter a unique name for the file in the value for 'File name:'
    7. Choose a save location -> click Save
    8. Click OK to clear the export location message

    By default your exported file will be in the following location:
    • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>

    Below is a link to the help guide on Exporting NinjaScripts.
    http://ninjatrader.com/support/helpG...-us/export.htm

    When finished I would recommend undoing all changes and revert back to a clean environment (meaning delete the open source script and remove any references that may have been manually added to prevent compile errors). This will make it easy to save this environment the next time you need to export.

    To switch back to your original environment:
    1. Shutdown NinjaTrader
    2. Rename (My) Documents\NinjaTrader 8 to (My) Documents\NinjaTrader 8.secondary\
    3. Rename (My) Documents\NinjaTrader 8.original to (My) Documents\NinjaTrader 8\
    4. Start NinjaTrader

    Below is a link to the hlep guide on Agile.NET protection.
    http://ninjatrader.com/support/helpG...l_security.htm

    You can purchase Agile.NET here.
    http://secureteam.net/Agile-for-NT-Pricing.aspx
    Last edited by NinjaTrader_ChelseaB; 10-17-2017, 10:38 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Yes, I received an auto response but never an answer after 2 business days.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by tgn55, Today, 07:22 AM
      0 responses
      2 views
      0 likes
      Last Post tgn55
      by tgn55
       
      Started by U0000999, Today, 05:17 AM
      0 responses
      4 views
      0 likes
      Last Post U0000999  
      Started by Prataturry89, Today, 03:40 AM
      0 responses
      5 views
      0 likes
      Last Post Prataturry89  
      Started by UltraFastKetoBoost28, Today, 02:43 AM
      0 responses
      6 views
      0 likes
      Last Post UltraFastKetoBoost28  
      Started by kojakojids, Today, 02:04 AM
      0 responses
      5 views
      0 likes
      Last Post kojakojids  
      Working...
      X