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

Using external .NET DLL's.

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

    Using external .NET DLL's.

    Hi,
    I am evaluating the NinjaTrader and trying to find out its major capabilities. I have a question, for which I couldn't find an explicit answer in documentation. Can I use in NinjaTrader scripts external .NET libraries like we do in regular .NET solutions simply by referencing them? I have DLL's with methods for time series analysis, which I'd like to use while scripting custom strategies. Is it possible?

    #2
    It is possible, but it is beyond the scope of what we can offer support for here on the forums.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thank you, Josh, for your prompt response. Does it mean that I still can find some documentation on how to do that?

      Comment


        #4
        Unfortunately there is no documentation available.

        Comment


          #5
          Thank you. This helps me to save time searching for it.

          Comment


            #6
            Hyppo,

            Google is your friend. Search for "import DLL .net" and you will find a wealth of information.
            mrlogik
            NinjaTrader Ecosystem Vendor - Purelogik Trading

            Comment


              #7
              Thank you, mrlogic, for you tip. I suspect you are talking about .net DLL's in general (I've been doing that for years), but I was trying to find out how to use them in NT. Out of curiosity I still searched Internet for DLL's in conjunction with NinjaTrader, but didn't see anything relevant to what I'm looking for. And even if I did, I am usually pretty cautious about using "undocumented" features. Too much at stake and not enough time! Today there is no lack of other products that do that.

              Comment


                #8
                Originally posted by Hyppo View Post
                Thank you, mrlogic, for you tip. I suspect you are talking about .net DLL's in general (I've been doing that for years), but I was trying to find out how to use them in NT. Out of curiosity I still searched Internet for DLL's in conjunction with NinjaTrader, but didn't see anything relevant to what I'm looking for. And even if I did, I am usually pretty cautious about using "undocumented" features. Too much at stake and not enough time! Today there is no lack of other products that do that.
                There's nothing special about using a DLL in NT NinjaScript C#. For a generic DLL...

                using System.Runtime.InteropServices;

                ...

                [DllImport("c:/MyFilePath/MyDLL.dll")]
                public static extern double MyGetDouble(int myInput);

                ...

                double myDouble = MyGetDouble(10);

                Comment


                  #9
                  Thank you, greentrader, for responding. Do you know what actually stands behind "C#-based script"? Is it a full-fledged C# or some proprietary subset of it? I don't remember seeing in the documentation any requirements for .NET framework.

                  Comment


                    #10
                    >> Is it a full-fledged C#
                    Correct. See our website for installation requirements (includes .NET framework).

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by yertle, Today, 08:38 AM
                    6 responses
                    24 views
                    0 likes
                    Last Post ryjoga
                    by ryjoga
                     
                    Started by algospoke, Yesterday, 06:40 PM
                    2 responses
                    24 views
                    0 likes
                    Last Post algospoke  
                    Started by ghoul, Today, 06:02 PM
                    3 responses
                    15 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by jeronymite, 04-12-2024, 04:26 PM
                    3 responses
                    46 views
                    0 likes
                    Last Post jeronymite  
                    Started by Barry Milan, Yesterday, 10:35 PM
                    7 responses
                    23 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Working...
                    X