Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

using DLL interface functions in c#

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

    using DLL interface functions in c#

    I tried adding a Ninjatrader COM Client reference to a C# project and got an error message saying that the activex type library was exported from a .NET assembly and that I should reference the .NET Assembly. I have a reference to NinjaTrader.Core.dll but this doesn't seem to contain the DLL interface functions

    I was able to get a DLL function to work using the following code:
    Code:
      [DllImport("NtDirect.dll")]
        public extern static int Connected(int showMessage); 
    
     public static int _ATIConnected()
     {
     int ShwMsg = 0;
     return Connected(ShwMsg);
     }
    Is this the only way to access the NtDirect.dll ATI Interface functions in C#?


    The COM interface & sample code didn't work on my PC when I tried using VB6 or .NET

    #2
    imported post

    Futures_Shark,

    We will respond to this shortly once development returns.


    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      You need to follow the docs (which does NOT reference NinjaTrader.Core.dll, see Automated Trading Interface -> COM interface) to set up the COM interface.

      The docs also hold info on the DLL interface in case the COM interface does not work for you, check out the eSignal sample implementation.

      Also: make sure you are on latest NT5 or NT6.

      Comment


        #4
        imported post

        I found that the file NinjaTrader.Client.dll can be added as a reference to a c# project and includes all the functions of the NtDirect.dll.

        Comment


          #5
          imported post

          Perfect!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by kaywai, 09-01-2023, 08:44 PM
          5 responses
          602 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          6 responses
          22 views
          0 likes
          Last Post xiinteractive  
          Started by Pattontje, Yesterday, 02:10 PM
          2 responses
          20 views
          0 likes
          Last Post Pattontje  
          Started by flybuzz, 04-21-2024, 04:07 PM
          17 responses
          230 views
          0 likes
          Last Post TradingLoss  
          Started by agclub, 04-21-2024, 08:57 PM
          3 responses
          17 views
          0 likes
          Last Post TradingLoss  
          Working...
          X