NexusFi: Find Your Edge


Home Menu

 





Access NT from Custom application


Discussion in NinjaTrader

Updated
    1. trending_up 2,423 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 alexboesky 
Ukraine, Kiev
 
Experience: Advanced
Platform: NinjaTrader Pro
Trading: ES, 6E, CL, GC
Posts: 9 since Dec 2011
Thanks Given: 0
Thanks Received: 1

How can I access NinjaTrader from custom application?

For example - I want to enumerate running strategies in my custom console application (Visual Studio).

Please help!


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CFTC Requests Tag 50 Trader Identity Data From CME and I …
Traders Hideout
The Confluence Meter: A Multi-Layered Signal Framework B …
The Elite Circle
Al Arabiya: US-Iran Draft Deal Within Hours Contains Hor …
Prediction Markets & Event Contracts
Victory Day Delivers: Russia-Ukraine Ceasefire Market Cl …
Prediction Markets & Event Contracts
SEC Chairman Calls for New Golden Age of SEC-CFTC Regula …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
20 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
5 thanks
  #3 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860



alexboesky View Post
How can I access NinjaTrader from custom application?

For example - I want to enumerate running strategies in my custom console application (Visual Studio).

Please help!

In your visual studio project add the NTdirect.dll
The DLL Interface functions are contained in NTDirect.dll located in the C:\WINDOWS\system32 folder.

Then call the function :
string Strategies(string account)

It gets a string of strategy ID's of all ATM Strategies of an account separated by '|'. Duplicate ID values can be returned if strategies were initiated outside of the ATI.


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 alexboesky 
Ukraine, Kiev
 
Experience: Advanced
Platform: NinjaTrader Pro
Trading: ES, 6E, CL, GC
Posts: 9 since Dec 2011
Thanks Given: 0
Thanks Received: 1


rleplae View Post
In your visual studio project add the NTdirect.dll
The DLL Interface functions are contained in NTDirect.dll located in the C:\WINDOWS\system32 folder.

Then call the function :
string Strategies(string account)

It gets a string of strategy ID's of all ATM Strategies of an account separated by '|'. Duplicate ID values can be returned if strategies were initiated outside of the ATI.

I tried to do it and got an error:

A reference to C:\windows\system32\ntdirect.dll could not be added. Please make sure that the file is accessible and it is a valid assembly or COM component.


Started this thread Reply With Quote
  #5 (permalink)
 alexboesky 
Ukraine, Kiev
 
Experience: Advanced
Platform: NinjaTrader Pro
Trading: ES, 6E, CL, GC
Posts: 9 since Dec 2011
Thanks Given: 0
Thanks Received: 1

I want custom application which will monitoring state of all strategies from NT8.


Started this thread Reply With Quote
  #6 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860


alexboesky View Post
I tried to do it and got an error:

A reference to C:\windows\system32\ntdirect.dll could not be added. Please make sure that the file is accessible and it is a valid assembly or COM component.

- NtDirect.dll is a plain old dll file and cannot be used within .net app unless you use something called Interop.

- There is another dll called NinjaTrader.Client.dll which is a fully managed .net assembly and can be directly added as a reference to your C# application.

Look at a few previous threads :



There is also possibility to talk to NT over a TCP socket (port 36973)


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on November 12, 2015


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts