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

Visual Studio - references to COM / dll objects

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

    Visual Studio - references to COM / dll objects

    All,

    I’m wondering if you can help me?

    I’ve been trying to get access to the NT functions via Visual Studio – Express at this stage, but I would like to upgrade to the full version once I get this working.

    I’ve tried to follow the discussions on the following threads:

    http://www.ninjatrader-support2.com/vb/showthread.php?t=6971

    http://www.ninjatrader-support2.com/vb/showthread.php?p=94393

    I’ve tried to import the COM object, using .Net Interpo services. And I’ve tried to use the dll workaround that a number of people have mentioned in their threads – e.g. using NinjaTrader.Client.Dll and not the recommended NTDirect.dll.

    When I try the recommended COM route I get the error message in the screen shot “not com” – this is on trying to import the NtDirect.dll into my VS project as a reference.

    When I try to use the other route - NinjaTrader.Client.Dll – I can’t seem to access the functions within the dll correctly. For instance, when I try to do a simple line by printing, I get issues not being able to use the overridden functions of Print(“”). I get all sorts of errors e.g. “Print() does not exist in the current context”.

    I would obviously like to use the NT supported route – i.e. NTDirect.dll. That way, we should see that interface continually supported. I know that some have had luck with using the non-supported route (i.e. NinjaTrader.Client.Dll), however, I understand if NT are saying it is not supported they must have good reasons (e.g. volatile code base and interfaces across upgrades maybe?).

    I did note that that NinjaTrader.Client.Dll doesn’t appear to contain any of the indicators as objects – this appears to be contained in NinjaTrader.Custom.dll. Additionally, there appears to be two versions of this dll on my machine. One in the NT install directory (Vista) – a back-up version and the version with my developed strategies as part of the namespace – in My Documents\NinjaTrader 6.5\bin\Custom.

    (As an aside - overridden print function appears to be contained in the NinjaTrader.core dll - C:\Program Files (x86)\NinjaTrader 6.5\bin\NinjaTrader.Core.dll).

    I have found this article which talks about putting a Runtime Callable Wrapper around a COM Type Library - http://www.codeproject.com/KB/COM/cominterop.aspx. However, I notice that the only Type library to be imported that relates to NT is the NinjaTrader Client (see screen shot – Add reference.jpg).

    After trying to put a RCW around this dll it obviously doesn’t work – as it isn’t a type library.

    I would appreciate any help anyone can offer, even if it is just a pointer to the relevant documentation.

    Kind regards,

    Dan
    Attached Files

    #2
    >> I’ve been trying to get access to the NT functions via Visual Studio
    Unfortunately this is beyond of scope of what we provide support for. May be the community wanted to contribute ?!?

    Comment


      #3
      Dierk,

      Thank you for your response.

      Again, my question is the same as it was to Josh last night; if a prospective development partner came to you and said they are trying to do the same thing, what would be the response?

      Kind regards,

      Dan

      Comment


        #4
        Please contact "sales AT ninjatrader DOT com" if you wanted to become a certified NinjaTrader consultant.

        Comment


          #5
          For those that come across this thread, please see this thread for more helpful information: http://www.ninjatrader-support2.com/vb/showthread.php?p=27661

          Kind regards,

          Dan

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by frslvr, 04-11-2024, 07:26 AM
          8 responses
          111 views
          1 like
          Last Post NinjaTrader_BrandonH  
          Started by stafe, 04-15-2024, 08:34 PM
          10 responses
          44 views
          0 likes
          Last Post stafe
          by stafe
           
          Started by rocketman7, Today, 09:41 AM
          3 responses
          8 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by traderqz, Today, 09:44 AM
          2 responses
          5 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by rocketman7, Today, 02:12 AM
          7 responses
          31 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X