NexusFi: Find Your Edge


Home Menu

 





Access NT from Custom application


Discussion in NinjaTrader

Updated
    1. trending_up 1,460 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?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Deepmoney LLM
Elite Quantitative GenAI/LLM
Exit Strategy
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
27 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 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