Announcement

Collapse
No announcement yet.

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, 12: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, 09: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.
                  Patrick H.NinjaTrader Customer Service

                  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:
                      http://ninjatrader.com/support/forum...ad.php?t=26644

                      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, 10: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
                        Patrick H.NinjaTrader Customer Service

                        Comment


                          #27
                          Good info here, too:
                          http://ninjatrader.com/support/forum...76&postcount=5

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Trader17, Today, 12:25 PM
                          1 response
                          3 views
                          0 likes
                          Last Post NinjaTrader_PaulH  
                          Started by Byron22, Today, 12:19 PM
                          0 responses
                          7 views
                          0 likes
                          Last Post Byron22
                          by Byron22
                           
                          Started by focus333, Today, 10:48 AM
                          1 response
                          17 views
                          0 likes
                          Last Post NinjaTrader_Kate  
                          Started by mohawkTrader, Today, 11:15 AM
                          0 responses
                          12 views
                          0 likes
                          Last Post mohawkTrader  
                          Started by JTizz, Today, 10:57 AM
                          4 responses
                          27 views
                          0 likes
                          Last Post JTizz
                          by JTizz
                           
                          Working...
                          X