Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get order status from log file

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

    Get order status from log file

    I send orders to NT from Tradestation using the NtDirect dll. I am able to retreive the order status while trading using the order names that I assign. My order names are verbose. The system assigns order IDs, which are long random strings. I would like to be able to get order status from the log files for previous dates, but in order to do that I think I need the NT order ID. Is there a way for me to get the NT order ID from my order name?

    #2
    Hello Atomic,

    There would not be a way to get the internal order id from the order name, there are no methods that return thatt from the ntdirect dll.

    One other note here is that trade station support is no longer available for the ntdirect dll, that is no longer used in nt8 when connecting with trade station and the nt7 connection scripts are no longer supported. You can use the email interface if you want to connect to tradestation. https://ninjatrader.com/support/help...nt8/set_up.htm



    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello Atomic,

      There would not be a way to get the internal order id from the order name, there are no methods that return thatt from the ntdirect dll.

      One other note here is that trade station support is no longer available for the ntdirect dll, that is no longer used in nt8 when connecting with trade station and the nt7 connection scripts are no longer supported. You can use the email interface if you want to connect to tradestation. https://ninjatrader.com/support/help...nt8/set_up.htm


      Do I understand correctly that there is no possible way to link an internal order ID with an external order name in the log file?

      I understand that you are no longer supporting the NtDirect dll. However, I don't believe any of the order management capabilities
      that come with the dll are available via the email interface. The only reason we use NT is because of the dll. Please say if what I
      said is incorrect.

      Comment


        #4
        Hello Atomic,

        There are no methods in the ntdirect dll which map an order id with an order name, the only methods which can be used can be found here: https://ninjatrader.com/support/help.../functions.htm

        What specific capabilities are you referring to? You can set up and try the email interface to make sure the parts you use are working correctly. The email interface should allow trade station to submit and manage orders in NinjaTrader similar to the ntdirect dll.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello Atomic,

          There are no methods in the ntdirect dll which map an order id with an order name, the only methods which can be used can be found here: https://ninjatrader.com/support/help.../functions.htm

          What specific capabilities are you referring to? You can set up and try the email interface to make sure the parts you use are working correctly. The email interface should allow trade station to submit and manage orders in NinjaTrader similar to the ntdirect dll.
          I do not use any Tradestation strategy ELDs for trading; it's all by order tickets. Will the email interface work with orders generated using TS order tickets?

          Comment


            #6
            Hello Atomic,

            If that is something which can be used from a strategy eld to submit strategy orders you can try it out, I am unsure if that part of their scripting would work or not for the email interface. That was never the intention behind the ntdirect dll, it was intended for a strategy to be submitting the orders.

            NinjaTrader relies on a strategy in trade station to submit orders which it picks up, That was the intention for the ntdirect dll. The Email interface relies on specific order events like Strategy Active Order. You can see the following page for the configuration of the interface and tradestation: https://ninjatrader.com/support/help...nt8/set_up.htm

            You can continue to use the dll interface as long as it continues to work however that is no longer supported in NT8 and is not suggested to be used for external applications like tradestation. All of the tradestation support/files for the dll interface has been removed in recent versions so I would suggest testing out the email interface and trying to make that work for your use case.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello Atomic,

              If that is something which can be used from a strategy eld to submit strategy orders you can try it out, I am unsure if that part of their scripting would work or not for the email interface. That was never the intention behind the ntdirect dll, it was intended for a strategy to be submitting the orders.

              NinjaTrader relies on a strategy in trade station to submit orders which it picks up, That was the intention for the ntdirect dll. The Email interface relies on specific order events like Strategy Active Order. You can see the following page for the configuration of the interface and tradestation: https://ninjatrader.com/support/help...nt8/set_up.htm

              You can continue to use the dll interface as long as it continues to work however that is no longer supported in NT8 and is not suggested to be used for external applications like tradestation. All of the tradestation support/files for the dll interface has been removed in recent versions so I would suggest testing out the email interface and trying to make that work for your use case.
              I rely heavily on the order management capabilities of the dll, such as NTCommand, NTChange, NTCancel, NTOrderStatus, etc. I don't think the email interface provides any of that functionality. If have used and continue to use the dll to do live trading through broker managed trading. It is very disappointing that this capability is essentially being done away with.
              Last edited by Atomic; 01-14-2023, 07:54 AM.

              Comment


                #8
                Hello Atomic,

                All I could suggest would be to test the email interface and make sure you can or cannot use what you normally use. If you see some feature missing we could put in a feature request for the email interface. The only other alternative would be to migrate to using NinjaTraders built in tools or NinjaScript strategies/code to execute orders instead of using trade station to pass orders to NinjaTrader.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Jesse View Post
                  Hello Atomic,

                  All I could suggest would be to test the email interface and make sure you can or cannot use what you normally use. If you see some feature missing we could put in a feature request for the email interface. The only other alternative would be to migrate to using NinjaTraders built in tools or NinjaScript strategies/code to execute orders instead of using trade station to pass orders to NinjaTrader.
                  The email interface is designed to be used with trading done using Tradestation strategies. I use no strategies in trading. It's all done with order tickets in indicator code. This is what I have been using for over ten years to do broker managed trading. The reason was because of the added slippage involved with using the email interface.

                  Comment


                    #10
                    Hello Atomic,

                    The email interface is designed to be used with trading done using Tradestation strategies.
                    Right, this is also the intention of the dll interface. The setup instructions go over specifically how to run a strategy to place trades in NinjaTrader, there were never guides or other information for any other use case involving the dll and tradestation as those uses were not supported. The two specific uses that the dll interface provided were the following:

                    Execute TradeStation strategy generated trade signals as live orders through NinjaTrader supported brokerage partners
                    A real time data feed to drive NinjaTrader as a trade simulator​
                    I use no strategies in trading. It's all done with order tickets in indicator code.
                    You are still submitting orders from a script. You can try recreating what you have in a strategy instead of an indicator so that the email interface can pick up the strategy order events. That's really all I can suggest because that is the extent of the support for tradestation use with NinjaTrader.

                    You can continue to use the dll interface while it continues to work but I would still suggest at working toward using the supported email interface to avoid any issues in the future. We can no longer provide assistance with the dll interface so if you run into any problems with that you should at that point use the email interface. If you still have problems with that interface we can at least assist with those type of questions or put in feature requests for enhancements.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Jesse View Post
                      Hello Atomic,

                      Right, this is also the intention of the dll interface. The setup instructions go over specifically how to run a strategy to place trades in NinjaTrader, there were never guides or other information for any other use case involving the dll and tradestation as those uses were not supported. The two specific uses that the dll interface provided were the following:




                      You are still submitting orders from a script. You can try recreating what you have in a strategy instead of an indicator so that the email interface can pick up the strategy order events. That's really all I can suggest because that is the extent of the support for tradestation use with NinjaTrader.

                      You can continue to use the dll interface while it continues to work but I would still suggest at working toward using the supported email interface to avoid any issues in the future. We can no longer provide assistance with the dll interface so if you run into any problems with that you should at that point use the email interface. If you still have problems with that interface we can at least assist with those type of questions or put in feature requests for enhancements.
                      The amount of effort required to convert all of my Easylanguage to strategies is more than I am willing to contemplate. In addition, there will be performance penalties. From my perspective, it would be a lot easier to just switch the accounts to Tradestation.

                      Comment


                        #12
                        Hello Atomic,

                        If that is what you need to do to achieve your goals you can certainly do that. I would otherwise suggest giving the email interface a try so you can at least address what may be changing in the future to make a plan. As mentioned this was a recent change that the dll interface is longer supported and instead the email interface is now the supported option for making that connection between trade station and NinjaTrader.
                        JesseNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by rhyminkevin, Today, 04:58 PM
                        4 responses
                        52 views
                        0 likes
                        Last Post dp8282
                        by dp8282
                         
                        Started by iceman2018, Today, 05:07 PM
                        0 responses
                        5 views
                        0 likes
                        Last Post iceman2018  
                        Started by lightsun47, Today, 03:51 PM
                        0 responses
                        7 views
                        0 likes
                        Last Post lightsun47  
                        Started by 00nevest, Today, 02:27 PM
                        1 response
                        14 views
                        0 likes
                        Last Post 00nevest  
                        Started by futtrader, 04-21-2024, 01:50 AM
                        4 responses
                        50 views
                        0 likes
                        Last Post futtrader  
                        Working...
                        X