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 alifarahani, 04-19-2024, 09:40 AM
                8 responses
                53 views
                0 likes
                Last Post alifarahani  
                Started by mmckinnm, Today, 01:34 PM
                2 responses
                5 views
                0 likes
                Last Post mmckinnm  
                Started by Conceptzx, 10-11-2022, 06:38 AM
                3 responses
                60 views
                0 likes
                Last Post NinjaTrader_SeanH  
                Started by f.saeidi, Today, 01:32 PM
                1 response
                2 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by traderqz, Today, 12:06 AM
                9 responses
                16 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X