NinjaTrader Support Forum  

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 04-11-2010, 04:11 AM   #1
Marzullo
Junior Member
 
Join Date: Feb 2009
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Exclamation Trying to call NT7 .NET interface from Java, looks like it worked

I am not an expert of .NET so I decided to exploit my existing java knowledge to use NT. I've seen in the documentation you've removed COM interface (why?), I am not a COM expert too but all I know is .NET can be also seen as COM object from outside.

The only free tool I could find on the net to call a com object from java is com4j.

With such tool, I did run a command against your tlb definition (ninjiatrader.client.tlb) and got some usable java proxy to call your client, attaching them to the post.

This is the sourcecode I am using to call your interface from java:

Code:
public static void main(String[] args)
        {
        _Client comObj = ClassFactory.createClient();
        IClient ntClient = comObj.queryInterface(IClient.class);

        int ret = ntClient.connected(0);
        System.out.println(ret);
        }
This code is printing 0, as soon as I enable AT from within NT 7.
I wondered if this could be a "safe" way to interop with your interface or would you suggest anything else? I could do everything in C# but I lose years and years of java exp, that'd be silly...
Attached Files
File Type: zip ntNetGate.zip (1.4 KB, 8 views)
Last edited by Marzullo; 04-11-2010 at 04:14 AM.
Marzullo is offline  
Reply With Quote
Old 04-11-2010, 01:27 PM   #2
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 90 times in 82 posts
Default

Marzullo, creating an interface to the ATI with Java could certainly work but it is definitely unsupported.
NinjaTrader_Austin 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET Version for NT7? jdfagan Version 7 Beta General Questions & Bug Reports 1 10-20-2009 10:01 PM
AT Interface and .NET tchapman ATM Strategies (Discretionary Trading) 2 04-15-2009 05:34 PM
.NET Interface mdm72 Automated Trading 3 03-10-2009 06:59 AM
Strategy worked well before upgrade to latest version. paco99 Strategy Analyzer 1 08-01-2008 10:38 AM
TWS, API, JAVA al_gorithm Miscellaneous Support 1 01-12-2006 09:02 AM


All times are GMT -6. The time now is 11:27 PM.