NexusFi: Find Your Edge


Home Menu

 





Access NT from Custom application


Discussion in NinjaTrader

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




 
Search this Thread

Access NT from Custom application

  #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?
Request for MACD with option to use different MAs for fa …
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
Battlestations: Show us your trading desks!
48 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,862



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 Twitter Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to rleplae for this post:
  #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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,862


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 Twitter Visit my NexusFi Trade Journal Reply With Quote
The following 3 users say Thank You to rleplae for this post:





Last Updated on November 12, 2015


© 2024 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 - Privacy Policy - Downloads - Top
no new posts