NexusFi: Find Your Edge


Home Menu

 





Access NT from Custom application


Discussion in NinjaTrader

Updated
    1. trending_up 1,480 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?
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
35 thanks
Tao te Trade: way of the WLD
25 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
22 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,863



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
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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


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
Thanked by:




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