Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Today, 09:29 PM
        0 responses
        6 views
        0 likes
        Last Post Belfortbucks  
        Started by zstheorist, Today, 07:52 PM
        0 responses
        7 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        151 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        6 views
        0 likes
        Last Post mattbsea  
        Working...
        X