Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How I can get the orders ID of my limit orders on Ninja Trader 8?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How I can get the orders ID of my limit orders on Ninja Trader 8?

    Hello Traders:

    I am using NtDirect.dll and the Orders Function closes my C# program?

    I connect to NT with function:

    connected = Connected(1);


    I try to retrieve Orders ID with this function but my program closes....

    I have 2 limit order on NT but this function doesn't work....

    string List_Orders_NT = Orders("Sim101");

    What I am doing wrong or this is not the approach to get the info I need it?

    thanks in advance

    Robert

    #2
    Hello Robert,

    Welcome to the NinjaTrader forums!

    Support for external applications is limited. Below is a link to a forum post that includes a few starter examples.
    https://ninjatrader.com/support/foru...626#post793626

    The Orders method is the correct method.


    Do you have the correct location for the file in the PImport?
    [System.Runtime.InteropServices.DllImport("C:\\Wind ows\\SysWOW64\\NtDirect.dll")]
    public static extern int Connected(int showMessage);

    If the project is a C# application, it might be easier to use the NinjaTrader.Client.dll approach.

    If the application crashes in debug mode in Visual Studio, there should be information about the crash in the Errors window or Output window.

    You can also use a try and catch to output the exception information to the Console output and prevent the application from crashing.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X