• 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

Export->Import Strategy Adds Source Code

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

    Export->Import Strategy Adds Source Code

    Hello,

    I would like to export my strategy as a binary file and import it into NT8 in order to "simulate" sharing my binary strategy. To test this, I used Tools->Export then deleted my source code from the Custom/bin folders. When I imported the strategy, I was able to view all of the source code in the NT platform, and the act of importing added the source code files back into the Custom/bin folders. Obviously, this is not what I want to do.

    How can I obtain a simple standalone binary file set for my strategy that does not make my source code accessible?

    #2
    Hello jflaggs,

    Thank you for writing to the support team.

    I am reviewing your inquiry and will be back with a reply shortly.

    I look forward to assisting further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello jflaggs,

      Thank you for your patience.

      While exporting a NinjaScript assembly, there is an option to export as a .dll compiled assembly. Have you tried this out yet?

      Additionally, you may add extra protection using a security service that we have licensed. You may read about this here:
      http://ninjatrader.com/support/helpG...l_security.htm

      I look forward to hearing of your results.
      Attached Files
      Chris L.NinjaTrader Customer Service

      Comment


        #4
        Yes, I selected the compiled assembly option. I will try it again and screenshot the process if it doesn't work again.

        Comment


          #5
          Chris,

          Here are my steps. At the end of importing, it gives me a message that I need to restart NT. When I restart NT, it adds all my source code back even though I manually deleted all of my source code from NT and even removed it from other file locations on my HDD.

          I noticed that the export archive zip file shown contains a copy of my strategy source code. I manually deleted that file before importing the dll.
          Attached Files

          Comment


            #6
            Hello jflaggs,

            Thank you for the reply.

            I tested this on my end and there is, in fact, a .cs file along with the .dll file. The .cs file is a "place holder" for the using directives and function overloads. If you look into this .cs file it does not resemble the original source code file.

            I look forward to hearing of your results.
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChrisL View Post
              I look forward to hearing of your results.
              The first time I exported, I did not delete the said .cs file. Only after noticing that the source code was made available did I try deleting the .cs file. So I have tried it both ways.

              When you go through this procedure, are you deleting your source code before importing? Does it add your source code back as well?

              Comment


                #8
                Hello jflaggs,

                Thank you for the reply.

                I just did the same procedure you did with the source code still in my directory,

                Tools>Export>NinjaScript>Export as compiled assembly>Add>Click 'Export'
                Then I deleted the source code.
                Now I will import the .zip file I exported. Tools>Import>NinjaScript

                When I check in the indicator directory, the source code is not there, but the indicator is in my list when I add it to a chart.

                Note that I did not need to restart NinjaTrader after the import.

                Maybe you have some third party .dll references that are getting in the way. Try to make a developer directory:

                To create a clean installation to export your NinjaScript objects from please follow the instructions below:

                Go to Help > License Key and copy and paste your License Key into a text document
                Export the code you want as the final export as source code
                Exit the platform
                Go to (My) Documents > rename the 'NinjaTrader 8' folder to 'NinjaTrader 8.Prev'.
                Then re-install from the following link: http://ninjatrader.com/PlatformDirect
                When you reinstall it will recreate the user folder you had just renamed with only stock files.

                Now you can start the platform and import the source code for the item you want to export as a compiled assembly. Because there are no other items in this installation, only the item you want to export would be included.

                To switch between the two installs; shut down NinjaTrader > rename the new installation to 'NinjaTrader 8.Dev' under (My) Documents > then rename the 'NinjaTrader 8.Prev' to 'NinjaTrader 8'. NinjaTrader looks for the user folder named NinjaTrader 8 specifically.

                If we may be of any further assistance, please let us know.
                Chris L.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by sergey_z, Today, 02:56 PM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by samir, Today, 02:46 PM
                1 response
                13 views
                0 likes
                Last Post NinjaTrader_Kate  
                Started by neoikon, Today, 02:24 PM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_ChristopherJ  
                Started by XimoTrader, Today, 12:57 PM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_PatrickG  
                Started by FxInception, Today, 12:27 PM
                2 responses
                14 views
                0 likes
                Last Post FxInception  
                Working...
                X