Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calling OrderStatus() function from TradeStation

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

    Calling OrderStatus() function from TradeStation

    Hello, assume Ninja places a Limit order and the order is "working" at the CME for 20 trading days. If from within our TradeStation EasyLanguge code we call the NTOrderStatus() function exactly 20 days after the limit order was placed will this function still return the string "WORKING"? Or will this function fail to return the string called "Working" due to the Order_ID value becoming not available or unknown after such a long period of time like 20 trading days??? Does Ninja remember the order_ID value after 20 days given that the limit order is still open and working at the CME after 20 days??? I need for Ninja not to forget the Order_ID as i want to be able to cancel the limit order after 20 days if not filled.

    Thanks in advance.

    Regards,

    Rod

    #2
    Hello Rod,

    Thank you for your post.

    The OrderId string would likely not be associated to the order if it was still active over multiple sessions. In general, NinjaTrader receives and update to orders from the brokerage technology connected after a connect and it would not have an associated orderId string as based on the DLL function calls.
    The DLL functions are not designed for long term investment trading or management of orders over long periods (multiple sessions).

    Please let me know if you have any questions.

    Comment


      #3
      How long is the orderId valid, one day, one week?

      Thanks,

      ccl3093

      Comment


        #4
        Hello ccl3093,

        Thank you for your post.

        This will depend on the brokerage technology used. You would need to speak with them directly on this.

        Comment


          #5
          I am going to use NT as brokerage. How will it be?

          Thanks,

          ccl3093

          Comment


            #6
            Hello ccl3093,

            The orderId should not change over multiple sessions. However, I recommend you contact NinjaTrader Brokerage Support directly for more information.

            You can find their contact information at the following link: http://ninjatrader.com/ContactUs

            Comment


              #7
              Thank you Patrick for the info.

              ccl3093

              Comment


                #8
                Hello,

                I send orders from Tradestation to ninjatrader for simulation. I have a difficult time to check orders' status. For example:
                1). I sent an market order from TradeStation to Ninjatrader.
                2). I used myOrderId = NTNewOrderId(), and got a orderId created by NT instead of my custom id.
                3). I called orderstatus = NTOrderStatus(myOrder);
                4). I got an empty string from the call instead of something like "Filled".

                Basically, my question is how to check order's status after I send orders from TS to NT.

                Thanks very much for help in advance.

                ccl3093
                Last edited by ccl3093; 01-22-2017, 10:21 PM.

                Comment


                  #9
                  Hello ccl3093,

                  Thank you for your post.

                  NTNewOrderId gets a new unique order Id, this does not pull your custom order Id.

                  If you supply a custom order Id that is not assigned to any of the methods they will return with no information.

                  How are you assigning "myOrder"? Why are you pulling the unique Id into a variable named "myOrderId" if this is not what you use to call the order?

                  I look forward to your response.

                  Comment


                    #10
                    Hi PatrichH,

                    I am very sorry that it is my bad. It is working quite well now.

                    I have two more questions:
                    1). Is it possible for me to get the time of order filled using code?
                    2). Is the simulation engine located on my local box, or on NT sever?

                    Thank you very much.

                    ccl3093
                    Last edited by ccl3093; 01-24-2017, 10:20 PM.

                    Comment


                      #11
                      I got replay from NT support for these two questions.
                      1). The simulation engine is on user's local box instead on NT server.
                      2). So far, there is no way to get order filled time from external program.

                      Thanks,

                      ccl3093

                      Comment


                        #12
                        At this time, The best way to monitor an order's status from external program is monitoring the log file.

                        If ninjatrader adds those order's events into global dictionary of C# in future, the monitoring order's status will be much easier.

                        thanks,

                        ccl3093

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Christopher_R, Today, 12:29 AM
                        0 responses
                        9 views
                        0 likes
                        Last Post Christopher_R  
                        Started by sidlercom80, 10-28-2023, 08:49 AM
                        166 responses
                        2,235 views
                        0 likes
                        Last Post sidlercom80  
                        Started by thread, Yesterday, 11:58 PM
                        0 responses
                        3 views
                        0 likes
                        Last Post thread
                        by thread
                         
                        Started by jclose, Yesterday, 09:37 PM
                        0 responses
                        8 views
                        0 likes
                        Last Post jclose
                        by jclose
                         
                        Started by WeyldFalcon, 08-07-2020, 06:13 AM
                        10 responses
                        1,415 views
                        0 likes
                        Last Post Traderontheroad  
                        Working...
                        X