Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing a custom DLL

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

    Accessing a custom DLL

    Hi,

    I have a custom DLL that I wish to access from Ninja. The DLL is written in C++.

    I have placed the DLL in the ..\bin\custom directory and added the DLL as a reference to the code. But when I compile the indicator code I get a CS0009 error.

    What can I do? Is it just that it's written in C++ (not C#)? Is there anything I can do at the compiler end (MS Visual Studio 2007)? I really don't want to have to rewrite my whole DLL in C#.

    Thanks for any help.

    #2
    Hello Bubblegum,


    You should be able to use a dll for C++. You might need to add a Using statement to this dll for indicators that need to access it.

    Using customDll.dll;

    If you continue to have issues, let us know the exact error message you're getting within the compiler.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your quick response.

      I've fixed it for now. I hadn't included the CLR switch in the compiler. I've done that and now Ninja appears to recognise the DLL.

      Comment


        #4
        Thanks. Glad to hear it's working for you now.
        Ryan M.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
        332 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