NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 01-02-2007, 04:12 AM   #1
Futures_Shark
Member
 
Join Date: Dec 2006
Location: , ,
Posts: 79
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

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
Futures_Shark is offline  
Reply With Quote
Old 01-02-2007, 05:42 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Futures_Shark,

We will respond to this shortly once development returns.


Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 01-02-2007, 05:48 PM   #3
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post 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.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 01-03-2007, 12:15 AM   #4
Futures_Shark
Member
 
Join Date: Dec 2006
Location: , ,
Posts: 79
Thanks: 0
Thanked 0 times in 0 posts
Post 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.
Futures_Shark is offline  
Reply With Quote
Old 01-03-2007, 02:17 AM   #5
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post imported post

Perfect!
NinjaTrader_Dierk is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:09 PM.