Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    571 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    330 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    101 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    548 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    549 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X