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

    #16
    Speedie6,

    My point is you know exactly which "strategyId" you used for the EURUSD and which one you used for the USDJPY. I'm not sure exactly how you have populated your grid, but you can just as easily populate it by accessing the TargetOrders() and StopOrders() based on their respective strategyId. Then you know exactly which instrument and type the orders are.

    Regardless, thank you for the suggestion. We will add it to the list of future considerations.
    Josh P.NinjaTrader Customer Service

    Comment


      #17
      EDIT: I Corrected errors below:

      Originally posted by NinjaTrader_Josh View Post
      My point is you know exactly which "strategyId" you used for the EURUSD and which one you used for the USDJPY.
      I always just use "BASIC" as my strategy, so they are the same for both the EURUSD and USDJPY. And I don't know the order ID except by manually looking except by manually looking in the NT Control Center.

      Originally posted by NinjaTrader_Josh View Post
      I'm not sure exactly how you have populated your grid, but you can just as easily populate it by accessing the TargetOrders() and StopOrders() based on their respective strategyId. Then you know exactly which instrument and type the orders are.
      As a matter of fact, how I filled out the type column, is indeed by calling TargetOrders and StopOrders. I must have a bug, because only one of the "Accepted" and one of the "Working" orders has the type filled out, when I should have had both of each filled out. But, those calls ONLY tell me which are stop and which are limit and tells me nothing else. And since, as I have been valiantly trying to explain, I don't know the order ID, I can't match them up except manually.
      Last edited by Speedie6; 04-27-2009, 03:14 PM.

      Comment


        #18
        I meant, I used the same strategy for all trades, basic, and have no idea of the order ID. I guess I could make separate strategies for each instrument. But that seems clumsy.

        Comment


          #19
          Speedie6,

          Give a separate strategyId name for each of your instruments. This is not the same as making two ATM strategies. It is just a string ID. I would not think this is clumsy.

          int Command(string command, string account, string instrument, string action, int quantity, string orderType, double limitPrice, double stopPrice,
          string timeInForce, string oco, string orderId, string strategy, string strategyId)

          STRATEGY - Strategy template name (must exist in NinjaTrader) <-- This is the name of your ATM strategy
          STRATEGY ID - Any string value (must be unique for each line/file) <-- This is whatever you want it to be. Make separate ones for your two instruments.

          With the separate strategyId's you can then correlate what you want with StopOrders() and TargetOrders().
          Josh P.NinjaTrader Customer Service

          Comment


            #20
            Originally posted by NinjaTrader_Josh View Post
            Give a separate strategyId name for each of your instruments. This is not the same as making two ATM strategies. It is just a string ID. I would not think this is clumsy.
            Thanks for your response. I had not noticed that strategy and strategyID were different. However, again, I believe you are assuming that the order was entered via the Command() function in the API. How does one set the strategyID of an order entered via the Chart Trader?

            Comment


              #21
              If that is the case there are other ways to get the information through changes in MarketPosition on particular instruments, but at that point in time it would be easier to just create separate ATM strategies. You really aren't losing anything from having two. It makes things easier and performance tracking more clean too.
              Josh P.NinjaTrader Customer Service

              Comment


                #22
                Well, at least we're finally communicating! And, I found what in my view I'd call a bug in the API. On my printscreen, the 'type' was filled out for one of the two trades, but not the other. So, I at first figured it was a bug in my program. But, upon investigation, I found out what the deal is.

                Since I entered both of those with a strategy of 'BASIC', my call to Strategies() returns "BASIC|BASIC", two identical strategies. Then I have a loop to call StopOrders() and TargetOrders() for each of the parsed values returned by Stragegies(), which happen to both be "BASIC". StopOrders() and TargetOrders() should return two orders each, since I have two active strategies both called "BASIC". But, I only get one value returned.

                This to me is a bug. Either NT should automatically make different StrategyIds, like maybe "BASIC_1", "BASIC_2" or some random string after BASIC. Or, it should return both orderIds when I call StopOrders() and TargetOrders().

                So, that means, at least with the way I have been using NT and what I wanted to accomplish, the API doesn't work so well. Nor do I really want to have to have different strategies for each instrument. Since I don't really utilize the functionality of ATM's -- maybe I should, but I don't -- that isn't the way I trade. So, since I don't really utilize ATMs, having to have more of them isn't ideal either.

                So, the bottom line is, I can't really do what I want. But, I'll give a try with entering the orders from my app. And then I will indeed have all the order information.

                Comment


                  #23
                  Speedie6,

                  To conclude this thread, there are routes to accomplish what you want. Some may not be the most convenient because it was not designed for your case scenario, but there should be no dead ends to accomplishing what you are trying.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Javierw.ok  
                  Started by timmbbo, Today, 08:59 AM
                  2 responses
                  10 views
                  0 likes
                  Last Post bltdavid  
                  Started by alifarahani, Today, 09:40 AM
                  6 responses
                  41 views
                  0 likes
                  Last Post alifarahani  
                  Working...
                  X