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 create a library

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

    #16
    Originally posted by ivb73077 View Post
    Jesse,

    I have created several UserDefinedMethod partial classes and integrated them with my strategy files. Everything is working perfectly.

    I now wish to share these files with my colleague but came across a post stating that UserDefinedMethod .cs files cannot be exported.

    I suspect I can circumvent this limitation by simply sending the .cs files and having my colleague copy them to the //NinjaTrader7/bin/Custom/Strategy folder. Do you know if this approach would work? Am I missing anything?

    Thank you.
    Rename the file that holds your partial classes. In other words, do not use UserDefinedMethods.cs as the file name.

    Comment


      #17
      Thank you.

      I had already done this as there are several such files I have created. Seems what I needed to do was package all the new partial class files together into a single ZIP file.

      I wonder if I need to include all these files with every strategy file I export? Or will it be sufficient to export the partial class ZIP file?

      Comment


        #18
        Originally posted by ivb73077 View Post
        Thank you.

        I had already done this as there are several such files I have created. Seems what I needed to do was package all the new partial class files together into a single ZIP file.

        I wonder if I need to include all these files with every strategy file I export? Or will it be sufficient to export the partial class ZIP file?
        If the Strategy uses any methods or variables defined in a partial class, the referenced partial class file will have to be exported with the Strategy.

        Comment


          #19
          Makes sense.

          I just wasnt sure if i needed to export all the partial classes every time i export a strategy that utilizes them or simply export once and allow each strategy exported thereafter to use the partial classes (as all strategies will use the same set of partial classes).

          thanks.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by algospoke, Yesterday, 06:40 PM
          2 responses
          19 views
          0 likes
          Last Post algospoke  
          Started by ghoul, Today, 06:02 PM
          3 responses
          14 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          45 views
          0 likes
          Last Post jeronymite  
          Started by Barry Milan, Yesterday, 10:35 PM
          7 responses
          20 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by AttiM, 02-14-2024, 05:20 PM
          10 responses
          181 views
          0 likes
          Last Post jeronymite  
          Working...
          X