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 dappa, Today, 09:18 AM
                0 responses
                0 views
                0 likes
                Last Post dappa
                by dappa
                 
                Started by bill2023, Yesterday, 08:51 AM
                4 responses
                22 views
                0 likes
                Last Post bltdavid  
                Started by trilliantrader, Today, 08:16 AM
                3 responses
                9 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
                79 responses
                19,662 views
                5 likes
                Last Post zrobfrank  
                Started by funk10101, Today, 08:14 AM
                3 responses
                5 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X