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

NinjaScript Libraries

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

    NinjaScript Libraries

    I'm trying to find out if NinjaScript supports the development of "Libraries"?

    In other languages, code functions can be developed into external libraries, "included" into the main script and called from that main script.

    I've been through the help file and don't see any reference to this feature. I do see .net class builders, but wanted to get an answer directly from your guys before I start working in .net to create a new class library.

    thanks in advance.

    B

    #2
    This is possible but not something we can provide support for.

    Please see this thread as I think it will help you through this process: http://www.ninjatrader.com/support/f...ad.php?t=44225

    Let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment


      #3
      How about this? Can one NinjaScript file call a function of another NinjaScript file and retrieve the return value(s)?

      Comment


        #4
        Absolutely.

        Here is an example: http://www.ninjatrader.com/support/f...ead.php?t=4991

        Let me know if I can be of further assistance.
        LanceNinjaTrader Customer Service

        Comment


          #5
          Originally posted by Bmatheny View Post
          I'm trying to find out if NinjaScript supports the development of "Libraries"?

          In other languages, code functions can be developed into external libraries, "included" into the main script and called from that main script.

          I've been through the help file and don't see any reference to this feature. I do see .net class builders, but wanted to get an answer directly from your guys before I start working in .net to create a new class library.

          thanks in advance.

          B
          Develop your library as a set of class files that are partial classes of the classes from which the main entities, indicators and strategies, derive. Use the UserDefinedMethods.cs files as templates.

          Comment


            #6
            Originally posted by koganam View Post
            Develop your library as a set of class files that are partial classes of the classes from which the main entities, indicators and strategies, derive. Use the UserDefinedMethods.cs files as templates.
            That's what I was looking for. I'd seen it before, but could not locate it in the help files. Thanks.

            Comment


              #7
              Can I encrypt and distribute a custom userDefinedMethod.cs file with my NinjaScript application?

              thanks for all the help guys. I'm almost ready.

              Comment


                #8
                While it's not supported, yes you will be able to include this file when exporting. Just like with exporting any other script it will appear in the export window: http://www.ninjatrader.com/support/h...tml?export.htm

                For encryption: http://www.ninjatrader.com/support/h...l_security.htm
                LanceNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by trilliantrader, 04-18-2024, 08:16 AM
                4 responses
                18 views
                0 likes
                Last Post trilliantrader  
                Started by mgco4you, Today, 09:46 PM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by wzgy0920, Today, 09:53 PM
                0 responses
                10 views
                0 likes
                Last Post wzgy0920  
                Started by Rapine Heihei, Today, 08:19 PM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by Rapine Heihei, Today, 08:25 PM
                0 responses
                10 views
                0 likes
                Last Post Rapine Heihei  
                Working...
                X