Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to know a Pending Fill

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

    How to know a Pending Fill

    My Strategy acts like a server to receive trade signals from one or more indicators....so...it needs to know if there is already an order that is submitted but has not been filled.

    There is no Pending Fill OrderState...from the documentation what I have is this

    OrderState.Initialized
    OrderState.Submitted
    OrderState.Accepted
    OrderState.TriggerPending
    OrderState.Working
    OrderState.ChangePending
    OrderState.ChangeSubmitted
    OrderState.CancelPending
    OrderState.CancelSubmitted
    OrderState.Cancelled
    OrderState.Rejected
    OrderState.PartFilled
    OrderState.Filled
    OrderState.Unknown

    so here is what I test to give me a pending order
    if (ThisOrder_1.OrderState == OrderState.Initialized ||
    ThisOrder_1.OrderState == OrderState.Submitted ||
    ThisOrder_1.OrderState == OrderState.Accepted ||
    ThisOrder_1.OrderState == OrderState.TriggerPending ||
    ThisOrder_1.OrderState == OrderState.Working ||
    ThisOrder_1.OrderState == OrderState.Unknown)

    would this be correct to derive a "pending fill" status?

    or, is there a better way to do this??

    Thanks

    #2
    Hello vantojo,

    If the order is pending a fill, this means that it is OrderState.Working or OrderState.Accepted. Once the order fills, the brokerage will send back OrderState.Filled.

    To know the order is closed it will have an an OrderState of OrderState.Filled, OrderState.Cancelled, or OrderState.Rejected.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      the other ones in my list aren't relevant?

      Comment


        #4
        Hello vantojo,

        The other states in the list would not be relevant to an order that is working and waiting for fill. This would be OrderState.Working and OrderState.Accepted.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          ok, thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by JT2020, Today, 04:23 AM
          0 responses
          1 view
          0 likes
          Last Post JT2020
          by JT2020
           
          Started by aslane, Today, 02:50 AM
          0 responses
          3 views
          0 likes
          Last Post aslane
          by aslane
           
          Started by fx.practic, Today, 02:07 AM
          2 responses
          10 views
          0 likes
          Last Post fx.practic  
          Started by Ousher, Today, 01:29 AM
          0 responses
          9 views
          0 likes
          Last Post Ousher
          by Ousher
           
          Started by tonynt, Today, 01:23 AM
          0 responses
          4 views
          0 likes
          Last Post tonynt
          by tonynt
           
          Working...
          X