Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Receiving order changed and execution events from NT

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

    Receiving order changed and execution events from NT

    Dear All,

    I have a custom application that helps with my trading stats. I can use it at the moment to hook into my IB TWS and monitor my working orders and executions.

    I would like to make it hook up with NT. What's the best way of doing this?

    I started by making it poll the NT log files periodically, but found latency issues here, because NT doesn't always flush out the log files as soon as an order is modified.

    Ideally, I would like to reference a .dll inside NT itself and receive events for orders created / modified and for executions.

    Any ideas?
    With many thanks,
    Ben

    #2
    - you should not access NT logs files, since this could cause lock ups in NT as NT tries to write information to the logs
    - Please check out the NT ATI DLL interface: http://www.ninjatrader-support.com/H...unctions2.html

    Comment


      #3
      Thank you so much for your very quick reply.

      I had not found NTDirect.dll in the windows\system23 directory, and am thankful to you for pointing it out!

      I haven't tried it out yet, but the interface looks as though it'll be perfect

      Cheers / Ben

      Comment


        #4
        You're welcome

        Comment


          #5
          Dear Dierk,

          Why do I receive a "A refence to ... could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component" error when trying to add a reference to c:\windows\system32\NTDirect.dll?

          I am using Visual Studio Express 2005, c#

          Cheers / Ben

          Comment


            #6
            Not sure what you are doing, but NtDirect.dll is not a COM dll nor a .NET assembly, but just a regular DLL.

            Comment


              #7
              Hi Dierk,

              In Visual Studio, I was clicking Project --> Add Reference --> Browse, and trying to add the dll that way.

              I know there is a way to explicitly link to the .dll in code, but I'm not sure how to do that. Is there any documentation on the topic?

              cheers / ben

              Comment


                #8
                Sorry no, we do not provide support down to that level.
                Hint: you would have to load the DLL via LoadLibrary and access the function as in the "good old" days.

                Comment


                  #9
                  OK. I finally found a way to connect to NT from c#, thanks to the post here:



                  The only problem now is: calling the Order() function does not return any orders unless they were created through the same interface. Am I correct in saying this?

                  I want to get a list of the orders that have been placed manually in the super dom.

                  cheers / Ben

                  Comment


                    #10
                    The DLL only maintains information on orders generated through DLL calls. There is no way to retrieve or manage orders generated through outside of a DLL call.
                    RayNinjaTrader Customer Service

                    Comment


                      #11
                      Dear Dierk and Ray,

                      Many thanks for your answers so far. I am wrecking my brains on this problem:

                      In my custom app, how do I get a list of the working orders that are currently active on NT, irrespective of how they were created?

                      cheers / Ben

                      Comment


                        #12
                        Sorry, this is not supported as this time.

                        Comment


                          #13
                          OK. Here's an idea.

                          By referencing other dll's, I was able to get a SuperDom form in my code, and display it. (I had to set the working directory of my software to the NT installation folder to make the superdom open without error)

                          In this state, however, it was not connected to the instance of NT which was running and showing market data. It seemed to be just an orphan.

                          Is it possible that I can "host" an NT process within my app. Then, I can show a superdom, and my software can be made a part of the loop thru which the orders are placed?

                          Anything to get that info.

                          cheers / ben

                          Comment


                            #14
                            It might be possible, but we do not provide support for that. Sorry, it's just a matter of bandwidth.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by michi08, 10-05-2018, 09:31 AM
                            3 responses
                            740 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by sightcareclickhere, Today, 01:55 PM
                            0 responses
                            1 view
                            0 likes
                            Last Post sightcareclickhere  
                            Started by Mindset, 05-06-2023, 09:03 PM
                            9 responses
                            258 views
                            0 likes
                            Last Post ender_wiggum  
                            Started by Mizzouman1, Today, 07:35 AM
                            4 responses
                            18 views
                            0 likes
                            Last Post Mizzouman1  
                            Started by philmg, Today, 01:17 PM
                            1 response
                            9 views
                            0 likes
                            Last Post NinjaTrader_ChristopherJ  
                            Working...
                            X