• 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

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.
    Lance B.NinjaTrader 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.
        Lance B.NinjaTrader 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
                Lance B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by zweistein, 11-14-2017, 03:24 PM
                2 responses
                1,476 views
                0 likes
                Last Post woodie1
                by woodie1
                 
                Started by Newtrader101, Today, 04:50 AM
                3 responses
                18 views
                0 likes
                Last Post NinjaTrader_ChrisL  
                Started by utilizator, Today, 06:31 AM
                3 responses
                13 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by digibob, Today, 01:13 AM
                3 responses
                14 views
                0 likes
                Last Post digibob
                by digibob
                 
                Started by calebsandfort, Yesterday, 05:16 PM
                2 responses
                11 views
                0 likes
                Last Post NinjaTrader_PaulH  
                Working...
                X