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

IOrder states logic

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

    #16
    Latest version of IOrder states diagram

    This is the latest version of the IOrder states diagram,
    where were added in red color:
    1. Overfill event
    2. Rejection event

    These are good candidates for error handling.
    Still any other improvements/insights ?

    Attached Files
    Last edited by misova; 05-01-2015, 01:32 AM.

    Comment


      #17
      Originally posted by misova View Post
      This is the latest version of the IOrder states diagram,
      where were added in red color:
      1. Overfill event
      2. Rejection event

      These are good candidates for error handling.
      Still any other improvements/insights ?

      There is a problem with your attachment - can you submit it again?

      Comment


        #18
        Thanx, should be updated and OK now...

        Comment


          #19
          I would suggest adding vertical swim lanes to separate which state/action happens on the PC or at the broker side

          Comment


            #20
            Originally posted by gregid View Post
            I would suggest adding vertical swim lanes to separate which state/action happens on the PC or at the broker side
            I am not sure, how to draw it ....the only action I see at the broker side is to reply with OK / REJECTED...

            In my thinking it would introduce some request / response sequence diagram,
            which I am not sure, how to draw and mix with current state nature of diagram
            in some elegant and simple way..

            If you have any idea how to draw it, I will do it pleasure...
            Last edited by misova; 05-01-2015, 10:34 AM.

            Comment


              #21
              I am sending the latest version of IOrder state diagram.
              The layout was significantly changed towards lower complexity
              and to be more specific and precise...


              Attached Files

              Comment


                #22
                Originally posted by misova View Post
                I am sending the latest version of IOrder state diagram.
                The layout was significantly changed towards lower complexity
                and to be more specific and precise...


                Very nicely done. Makes the order states clear and transparent. I suggest the NT adopt it and put it in the official documentation.

                Comment


                  #23
                  Hello,

                  Thank you all for your comments on misova's diagram.

                  I have forwarded koganam's suggestion to the development team for consideration in the documentation.

                  Comment


                    #24
                    Very cool - I appreciate the efforts in this thread. We'll look to have something of this nature added to NinjaTrader 8 documentation when we have the time.
                    MatthewNinjaTrader Product Management

                    Comment


                      #25
                      "not accepted" vs "rejected": Calling ChangeOrder on a Working order

                      Something in this order flow chart is not as clear as I was hoping for.

                      When ChangeOrder() is issued on an order in the Working state, and the change is not accepted, doesn't the original state of the order remain in the Working state?

                      See last post in this thread:


                      It seems the chart does not quite reflect Josh's point.

                      My deeper question is this:
                      If Josh's comment in the above thread is true, how does one discover the change request was not accepted? I mean, what does "not accepted" mean? I note that Josh did not use the word "rejected", he specifically used the words "not accepted".

                      Ok, so if a Working order remains in a Working state after a ChangeOrder() is not accepted, how does one discover this "not accepted" status of the call to ChangeOrder?

                      [I mean, one could assume that a change request via ChangeOrder that is not accepted would change a Working order to a Rejected order ... but if Working state means working at the exchange, I can understand how a "not accepted" change request would not actually affect the status of "working at the exchange".]

                      Thus, I can see how it does make sense that a change request that is "not accepted" does not change the state of a Working order. But, there we go again ... from a NinjaScript point of view (aka the Strategy programmer) what does "not accepted" really mean?

                      How does the strategy programmer know that a change request via ChangeOrder on a Working order is "not accepted"? ChangeOrder has no return value ...

                      Am I nuts?
                      What am I missing?
                      In context of calling ChangeOrder on a Working order, what is the difference between "rejected" and "not accepted"?

                      And, also, for sake of complete understanding, are there cases where a ChangeOrder on a Working order would ever change the state to Rejected?

                      And, lastly, does the order flow chart need updating to reflect any of this?
                      Last edited by bltdavid; 10-14-2015, 11:38 PM. Reason: Added question "for sake of completeness"

                      Comment


                        #26
                        Hello bltdavid,

                        Thank you for your post.

                        You would use OnOrderUpdate() and check for the Error listed as ErrorCode.UnableToChangeOrder. Keep in mind the order will just stay in the state it was, so the state won't change.

                        For information on what information you can pull from an order event please visit the following link: http://ninjatrader.com/support/helpG...t7/?iorder.htm

                        Comment


                          #27
                          Good info here, too:

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by martin70, 03-24-2023, 04:58 AM
                          15 responses
                          114 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by The_Sec, Today, 02:29 PM
                          1 response
                          5 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by jeronymite, 04-12-2024, 04:26 PM
                          2 responses
                          31 views
                          0 likes
                          Last Post NinjaTrader_BrandonH  
                          Started by Mindset, 05-06-2023, 09:03 PM
                          10 responses
                          265 views
                          0 likes
                          Last Post NinjaTrader_BrandonH  
                          Started by michi08, 10-05-2018, 09:31 AM
                          5 responses
                          743 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Working...
                          X