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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        162 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        313 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        350 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X