Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DLL interface -- where to get rest of order info?

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

    DLL interface -- where to get rest of order info?

    Okay, in reviewing the functions available in the DLL interface, I see that I can get list of order IDs by account, using the Orders() function. And, from the OrderID, I can use the functions AvgFillPrice(), Filled() and OrderStatus() to get the average fill price, qty filled, and order status string. Okay, I think I got that.

    But, what about the rest of the information about the order? Like the instrument, order type, stop value, limit value, and others? I don't see any functions listed to get this information.

    #2
    Hello,

    I will have someone reply to your post on Monday. Thank you for your patience.
    DenNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Ben View Post
      Hello,

      I will have someone reply to your post on Monday. Thank you for your patience.
      Oh, you guys always respond quickly. Very good. Now, I don't always like the response--all too often the answer boils down to that I'm outa luck, but, at least you respond!

      So, I look forward to the response tomorrow.

      Comment


        #4
        Unfortunately you will need to track that other information by hand if you have some need for it.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          Unfortunately you will need to track that other information by hand if you have some need for it.
          I was afeared you'd say that. Is there any particular reason why you have handicapped the DLL interface?

          Comment


            #6
            Speedie6,

            It is not really handicapped. You can name your orders to reflect the information you want and then it becomes directly accessible that way since that information is static anyways.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              Speedie6,

              It is not really handicapped. You can name your orders to reflect the information you want and then it becomes directly accessible that way since that information is static anyways.
              I'm not understanding what you are saying. Strategies of course have names. And orders have order IDs. But, I don't know anything about naming orders. I don't see anything in the API about that. Nor do I see any way to get complete details on orders via any means.

              Comment


                #8
                Speedie6,

                You can give your orders any orderId you wish as you issue the Command. Just give it an orderId reflective of the information you want while insuring it is unique. When you are placing the order you know what instrument you are placing on. You know what order type it is. Give it a name containing the info you want. Then when you access the order list it is just a matter of reading the strings for the info.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Josh View Post
                  You can give your orders any orderId you wish as you issue the Command. Just give it an orderId reflective of the information you want while insuring it is unique. When you are placing the order you know what instrument you are placing on. You know what order type it is. Give it a name containing the info you want. Then when you access the order list it is just a matter of reading the strings for the info.
                  Ah, okay, well, let me explain more what I am trying to accomplish. NinjaTrader ATM strategies are a great idea. But, as I understand it, correct me if I'm wrong, there isn't any good way to change a strategy or attach a strategy to an open order. I overall love your chart trader. And usually enter my orders from there. But I sometimes what to change my target and/or stops after an order has been placed. So, I was writing an application to take over a trade already in progress. But I'll have to manually match the order IDs.

                  Comment


                    #10
                    Speedie6,

                    Unfortunately there is no way to attach/change an ATM strategy onto an already opened position.

                    Well, you know which targets and stops are associated to which ATM strategies through the strategyId. If you name your strategyId in a way reflective of your instrument/etc you will then be able to know everything you would need. From there you know your targets are limit orders and your stops are stop orders and you can make amends however you see fit.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Josh View Post
                      Unfortunately there is no way to attach/change an ATM strategy onto an already opened position.
                      That is what I thought.

                      Originally posted by NinjaTrader_Josh View Post
                      Well, you know which targets and stops are associated to which ATM strategies through the strategyId.
                      Well, you see, I know that your ATM strategies are powerful and all, but, rigid stops/targets just isn't how I trade. I pick stops/targets based on what the chart tells me they should be. So, I just have a generic strategy with stop/target 20 points up and down, just to initiate the trade, and then use the chart-trader to drag them where I really want them.

                      So, my strategy name really tells me nothing. Where I would use my application is when I personally am ready to quit for the day, but I might still have an open trade or two, hopefully in profit. I might then want my app to manage the trailing stop.

                      So, in short, to make my app work like that, I'd just have to manually match up the orders.

                      Comment


                        #12
                        Not sure I follow. You can match up your trades very easily through matching the "strategy" and "strategyId". The "strategy" parameter is the name of your ATM strategy which may or may not be that useful. The "strategyId" is any name you give the strategy yourself. This can be anything you want. You can then use things like TargetOrders(string strategyId) or StopOrders(string strategyId) to get the stop/targets for the strategy. Make amends however you see fit off of that.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_Josh View Post
                          Not sure I follow. You can match up your trades very easily through matching the "strategy" and "strategyId".
                          But I'll have to manually enter everything into my app. Please consider it a suggestion for enhancement to provide complete trade details from the DLL interface.

                          Comment


                            #14
                            Still not following you Speedie6. There is no manual intervention needed at all. Especially since all you are trying to do is modify orders you don't even need any information like what instrument/order type. Just find the stop/target orders, and then use Command() to modify them. If you are using the DLL interface from eSignal or TradeStation you can also use the NTChange().
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              Okay, for simulation purposes, I entered a trade for USDJPY and a trade for EURUSD, in my SIM101 account. In the printscreen below, on top, I have the NT Control Center, Orders tab showing, with all the nice info showing.

                              In the lower part of the screen is my app. Can you tell me which of the trades in my application are of USDJPY and which is EURUSD? Of course you can, by matching the ID's between the two. But, my point is, I should be able to get that information so that I wouldn't have to manually match them up.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Tim-c, Today, 03:54 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post Tim-c
                              by Tim-c
                               
                              Started by FrancisMorro, Today, 03:24 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post FrancisMorro  
                              Started by Segwin, 05-07-2018, 02:15 PM
                              10 responses
                              1,771 views
                              0 likes
                              Last Post Leafcutter  
                              Started by Rapine Heihei, 04-23-2024, 07:51 PM
                              2 responses
                              31 views
                              0 likes
                              Last Post Max238
                              by Max238
                               
                              Started by Shansen, 08-30-2019, 10:18 PM
                              24 responses
                              945 views
                              0 likes
                              Last Post spwizard  
                              Working...
                              X