Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 llanqui, Today, 03:53 AM
    0 responses
    5 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    15 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Working...
    X