Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 Equivalent - CancelAllOrders()

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

    NT8 Equivalent - CancelAllOrders()

    In NT7 I used CancelAllOrders() in a strategy. I cannot find on the forums or in code where the equivalent method is. If it doesn't exist, is there a preferred way to cancel all orders for a strategy?

    Thanks!

    #2
    Hello thomaspartyof10,

    Thanks for opening the thread.

    CancelAllOrders() is available under the Account object. This will cancel all orders on the account, not limited to the strategy.

    This method is documented here: https://ninjatrader.com/support/help...lallorders.htm

    For cancelling orders for a strategy itself, I would recommend tracking the orders with Order objects and cancelling those orders with your own method that will call CancelOrder() for each of those orders. The SampleOnOrderUpdate strategy for NT8 demonstrates how such a method can be created and how Order objects can be used.

    CancelOrder() - https://ninjatrader.com/support/help...ancelorder.htm

    SampleOnOrderUpdate - https://ninjatrader.com/support/foru...ead.php?t=7499

    Also worth mentioning is the CloseStrategy() method that will cancel order and close open positions of that strategy.

    CloseStrategy() - https://ninjatrader.com/support/help...sestrategy.htm

    Please let me know if I may be of further help.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    93 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    138 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    123 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    73 views
    0 likes
    Last Post PaulMohn  
    Working...
    X