Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using NTOrderStatus for Stops/Target

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

    Using NTOrderStatus for Stops/Target

    Hi,
    I understand that I can use Stop1, Target1 in place of OrderID to get the status of an order or to change it. My question is how do you do this when you have multiple positions across mulitple instruments? THe NTORderStatus function only takes orderID and this would be the same for every position (ie Stop1, Target1, etc)

    I was thinking there must be a way to send the StrategyID with the request but don't know the correct parameter input order to use in the dll call,
    ie is it
    dll.call(("OrderStatus",orderid, strategyid)
    or
    dll.call("OrderStatus, orderid,"","","","","","","","","","","",strategyi d)

    Or is there some other way to do it?

    THanks,

    Jonathan

    #2
    imported post

    You need to pass in a strategy id which would uniquely identify the stop/target . This means you need to pass in a strategy id on the first order that creates the strategy. Make sure you use unique strategy ids.

    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      THanks. I am doing that. Where I'm confused is when I'm checking order status for a specific instrument/strategy combo, what do I pass through the NTORderStatus function? If I use Stop1, Target1, etc, and I have 5 open positions, how do I know which status is being reported back?
      Jonathan

      Comment


        #4
        imported post

        Sorry for the confusion. Right now there is no way to retrieve order status on a strategy based order. It is on our list. No ETA at this time.

        Ray
        RayNinjaTrader Customer Service

        Comment


          #5
          imported post

          Bummer.
          Let me ask the question another way. I need to determine if there is are outstanding stop & target orders for a specific instrument. I have the orderID and strategyID available. Using orderID I can determine if the entry order was filled, but how do I determine if any of the stops or targets are still open?

          The issue is I am running into is with IB and forex trades. THere are no positions so NTMarketPosition always returns flat so I can't determine if I am still in a position when another signal is generated. I thought checking if any of the stops/targets are still unfilled from the last order sent from Esignal would give me the information I need.

          Thanks,

          Jonathan

          Comment


            #6
            imported post

            There is no way to retrieve this information. This is a known limitation and on our list. The only thing you could do is take care of the stop/target submission on your side and not use an NT strategy.

            Ray
            RayNinjaTrader Customer Service

            Comment


              #7
              imported post

              OK. THanks. Just wanted to make sure there was no way around it.

              Jonathan

              Comment


                #8
                imported post

                No problem. The problem is that there can be more than one order at the T1 level and therefore you can have multiple order states....
                RayNinjaTrader Customer Service

                Comment


                  #9
                  imported post

                  Hello,

                  Just looking for the same thing, just wondering if there has been any progress on this since March?

                  Comment


                    #10
                    imported post

                    No progress.

                    Comment


                      #11
                      imported post

                      Ok,

                      Does anybody know of any work arounds? I am using esignal to trigger with efs and IB as the broker. The ASMs are the best way to initiate the trade, but I need to know how the strategy went after it was filled. Has anybody done a method using the IB activeX controls or Ninja Script.

                      I would like to use something better then account p/l to calculate this.

                      Please please please get back to me.

                      Comment


                        #12
                        imported post

                        Sorry to ramble, but is maybe the best way to do this:

                        place a strategy with an order id
                        if it gets filled monitor the strategy position.
                        If it goes flat
                        look at current price
                        if it is close to the target or above
                        assume success
                        else
                        assume failed trade

                        ???

                        Comment


                          #13
                          imported post

                          That could work.
                          RayNinjaTrader Customer Service

                          Comment


                            #14
                            imported post

                            I got this working and so far it is pretty accurate, but it would be great if in the next version you could get more information about a stratefy like relized p/l and unrelized p/l plus th stuff you can use on a regular order.

                            My next question is this: why would I get this error?

                            5/19/2006 8:21
                            Strategy
                            Entry order quantity is greater than cummulative totals of stop loss/profit target quantities
                            5/19/2006 8:21 Strategy Entry order quantity is greater than cummulative totals of stop loss/profit target quantities

                            Comment


                              #15
                              imported post

                              Because the order qty of the order you are entering exceeds the total qty the strategy will manage.

                              If you have a strategy to manage 5 contracts, your entry order needs to be 5 contracts.
                              RayNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by bortz, 11-06-2023, 08:04 AM
                              47 responses
                              1,609 views
                              0 likes
                              Last Post aligator  
                              Started by jaybedreamin, Today, 05:56 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post jaybedreamin  
                              Started by DJ888, 04-16-2024, 06:09 PM
                              6 responses
                              19 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by Jon17, Today, 04:33 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Jon17
                              by Jon17
                               
                              Started by Javierw.ok, Today, 04:12 PM
                              0 responses
                              16 views
                              0 likes
                              Last Post Javierw.ok  
                              Working...
                              X