Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access to class in compiled DLL (addon)

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

    Access to class in compiled DLL (addon)

    Hello,

    I have a compiled indicator that also includes an addon. This addon contains a public class. I am trying to access that class from within ninjascript, but get an error on compile stating the type already exists in the indicator.dll

    To clarify, I am just trying to declare, in a new indicator source file, like this

    private NinjaTrader.NinjaScript.AddOns.myAddon.test test = null;

    Intellitext picks it up fine, it all looks OK, and it will compile on a system that has all the original sources. But, if the indicator/addon is a DLL, installed first, this source will not compile and fails with the error stated.

    Any idea how to make this work? It seems that if it compiles as 100% source, it should compile with the addon in the DLL, too?

    Thanks.

    #2
    Hi pjsmith, thanks for posting.

    It's going to depend on exactly how this DLL is set up. If you can contact the original developer on how to access the custom class then that would be the best place to ask. In my test I added an indicator and an addon in an export DLL and I am able to access the class from the namespace containing the addon and custom class. Unfortunately I can not speculate on what the structure of your custom DLL is.

    Best regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    55 views
    0 likes
    Last Post CarlTrading  
    Working...
    X