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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X