Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

queue position.

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

    queue position.

    how can i determine queue position for open limit orders in an AddOn?

    #2
    Hello JimB17,

    From my understanding the queue position is not reported back for working orders from the brokerage to NinjaTrader.

    Would you like to submit a feature request for NinjaTrader to estimate a queue position for a working order?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello JimB17,

      From my understanding the queue position is not reported back for working orders from the brokerage to NinjaTrader.

      Would you like to submit a feature request for NinjaTrader to estimate a queue position for a working order?
      The JigSaw DOM does this. Perhaps it snapshots then counts down?

      Comment


        #4
        Hello JimB17,

        The JigSaw software is made by a separate company that is not apart of NinjaTrader.

        I do not have access to the open source code of this script. If you can provide this, I may be able to read the code to see what this does.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I don't think you can get a "REAL" queue position, but you could get a worst case scenario queue position. The reason why a real position is difficult to estimate is that once you are in queue, if someone cancels an order at your price level, you don't know if the order that was canceled was in front of your position or behind.

          This is how I would estimate the queue:

          1) When you place an order, check the state of the order. Once you get an event that says the order is working you need to check the depth (queue) of the price level you placed the order at. You could actually check the queue before, as you submit the order and then compare both results. You can average the before and after queues, or take the worst case scenario (after).

          2) Then on OnMarketData you need to read all of the trades that happen at that price level and adjust your queue accordingly. You can also read if someone canceled an order at that price level, but you wouldn't know if that order was in front or not, so I would personally not adjust and assume worst case scenario.

          I wouldn't mind building it if someone would try it live and tell me how accurate it is...

          Cheers!

          Comment


            #6
            Originally posted by jortuzar View Post
            I don't think you can get a "REAL" queue position, but you could get a worst case scenario queue position. The reason why a real position is difficult to estimate is that once you are in queue, if someone cancels an order at your price level, you don't know if the order that was canceled was in front of your position or behind.
            Cheers!
            Thanks for the reply. Yes I believe you are correct both with the approach and pitfalls of the suggested solution. Also believe sometimes the queue can be circumvented with fill priorities but at least the task can be approached as you suggest.

            I've been working on other stuff but will get back to this sometime soon. It is pretty straightforward to implement already monitoring all the vital bits just need a touch o' logic.

            Thanks again!

            Comment


              #7
              Originally posted by JimB17 View Post
              Thanks for the reply. Yes I believe you are correct both with the approach and pitfalls of the suggested solution. Also believe sometimes the queue can be circumvented with fill priorities but at least the task can be approached as you suggest.

              I've been working on other stuff but will get back to this sometime soon. It is pretty straightforward to implement already monitoring all the vital bits just need a touch o' logic.

              Thanks again!
              NT8 Super DOM can return an APQ. You just have to dig until you find where NT8 holds the relevant information.


              (4th bullet/fold on page)

              Comment


                #8
                Originally posted by NinjaTrader_ChelseaB View Post
                Hello JimB17,

                From my understanding the queue position is not reported back for working orders from the brokerage to NinjaTrader.

                Would you like to submit a feature request for NinjaTrader to estimate a queue position for a working order?
                It's since June 2017 that CME released the MBO (market by order) that provides a real, not estimated position in queue.

                Learn more about market by order (MBO) an order-based data feed which provides the ability to view individual queue position and more.


                When Ninjatrader 8 will support that feature?

                Comment


                  #9
                  Hello paulg,

                  Thank you for your post.

                  I could not guarantee implementation of this but I will forward your note to our development team.

                  Please let me know if you have any questions.

                  Comment


                    #10
                    Hello paulg,

                    Thank you for your patience.

                    Your request has been assigned the internal tracking id of SFT-1496.

                    Please let me know if you have any questions.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by maybeimnotrader, Yesterday, 05:46 PM
                    2 responses
                    20 views
                    0 likes
                    Last Post maybeimnotrader  
                    Started by adeelshahzad, Today, 03:54 AM
                    5 responses
                    32 views
                    0 likes
                    Last Post NinjaTrader_BrandonH  
                    Started by stafe, 04-15-2024, 08:34 PM
                    7 responses
                    32 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by merzo, 06-25-2023, 02:19 AM
                    10 responses
                    823 views
                    1 like
                    Last Post NinjaTrader_ChristopherJ  
                    Started by frankthearm, Today, 09:08 AM
                    5 responses
                    22 views
                    0 likes
                    Last Post NinjaTrader_Clayton  
                    Working...
                    X