Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Call C/C++ DLL Functions from within my NinjaScript NT8 Indicator

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

    Call C/C++ DLL Functions from within my NinjaScript NT8 Indicator

    I have been trying to find out if it is possible to call C/C++ DLL functions from within NinjaSript.

    I know it is possible from C# but after doing some Googling, I am seeing mixed messages on the subject and most posts are very old.

    Does anyone know if this can be done, and if so, is the process exactly the same as doing it from C#?

    #2
    Hello BlakJak888,

    Welcome to the NinjaTrader forums!

    From my understanding this is possible, but please note this is outside of what is supported by NinjaTrader Support.

    The assemblies will need to be PInvoked using DllImport. (It will not be able to be referenced like a managed C# assembly)

    Below is a publicly available link to the microsoft documentation.
    https://docs.microsoft.com/en-us/dot...nterop/pinvoke

    A publicly available link to an educational site, StackOverflow.
    https://stackoverflow.com/questions/...dll-in-c-sharp

    And a link to an example.
    https://ninjatrader.com/support/foru...300#post777300
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks. I am glad to hear that it is possible since the internet was extremely vague and had differing views on the subject. I can handle the coding provided the platform will accept the external calls to the DLL.

      Comment


        #4
        Hello BlakJak888,

        NinjaScript is written in C# (.NET 4.5) and will have all of the abilities of .NET 4.5 application.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        574 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        333 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
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X