• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8: What are Order.States that allow to cancel an Order?

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

    NT8: What are Order.States that allow to cancel an Order?

    When a Strategy triggers a signal and submits an order, it will take a time before the Order gets "OrderState.Working" ( accepted and live at the exchange ).

    My question is: what if the Strategy needed to cancel that Order before it gets "OrderState.Working" ? Could it be possible to cancel an order in any of these Order.State ?:

    OrderState.Accepted
    OrderState.PendingChange
    OrderState.PendingSubmit

    Or even simpler question:
    Can a Strategy cancel an order which is " NOT NULL " ?

    Thanks
    Last edited by pstrusi; 06-17-2018, 02:41 AM.

    #2
    Hello pstrusi,

    An order can be cancelled in any state except for Filled, PartFilled, or Cancelled. With these states it would cause an overfill.

    Let me know if you would like all the other states than these states listed.

    While it is allowed to cancel an order in any other state than these states, there may be other reasons than an order cannot be cancelled (such as improper oco use).

    An order variable must not be null and must be assigned an order object for this to be passed to CancelOrder.

    However, it would not have state at all, as this would be a variable that does not have any order object at all.

    Below is a public link to the help guide on CanceOrder().
    https://ninjatrader.com/support/help...ancelorder.htm

    This is also true of NinjaTrader 7.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Seastragg, Today, 04:41 PM
    0 responses
    2 views
    0 likes
    Last Post Seastragg  
    Started by n8dogg59, Today, 03:07 PM
    0 responses
    4 views
    0 likes
    Last Post n8dogg59  
    Started by Newtrader101, Today, 10:31 AM
    1 response
    19 views
    0 likes
    Last Post koganam
    by koganam
     
    Started by nepenthean, Today, 12:36 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by sun0781, Yesterday, 05:02 PM
    1 response
    25 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X