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

DLL is sharing memory

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

    DLL is sharing memory

    Hi,

    I have an indicator calling a custom DLL. It all works fine. But when I run the indicator on a second chart it is apparent that the two indicators are sharing the same instance of the DLL. The indicators are overwriting each others data.

    How do I do this so that each indicator runs it's own instance of the DLL? Or what information can I pass to the DLL so that it can uniquely identify each indicator that calls it? (Having multiple copies of the DLL is not an option).

    Thanks

    #2
    Hi bubblegum,

    This depends on how your dll is coded. Unfortunately we can't support the functionality for custom dlls.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I appreciate you don't support custom DLLs. But how would I uniquely identify an indicator? Is there a word with an ID that is unique to that indicator on that chart?

      Comment


        #4
        There's no supported technique for capturing an unique indicator ID. To see how we use dlls in our framework: You can export standard NinjaScript files as an assembly and import it back in (being sure to remove source before import). Each time you apply the indicator will be a unique instance.

        There may also be a C# solution available. Hopefully other community members can share their experience.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          That was informative, but unfortunately I'm using DLLImport.

          I know another way.

          Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ScottWalsh, Today, 06:52 PM
          4 responses
          32 views
          0 likes
          Last Post ScottWalsh  
          Started by olisav57, Today, 07:39 PM
          0 responses
          4 views
          0 likes
          Last Post olisav57  
          Started by trilliantrader, Today, 03:01 PM
          2 responses
          19 views
          0 likes
          Last Post helpwanted  
          Started by cre8able, Today, 07:24 PM
          0 responses
          6 views
          0 likes
          Last Post cre8able  
          Started by Haiasi, Today, 06:53 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X