Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to cancel all pending orders including TP and SL

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

    How to cancel all pending orders including TP and SL

    Hello NT Team,

    When I place an order, I automatically put a Take Profit for it, and on the other side I place an order LIMIT to re-enter if the market goes to the opposite side, but sometimes I want to cancel all those pending positions to re-SET another TP for the new positions.

    For example at the beginning I enter Long 1 contract, and I set the TP at 5 ticks above the "Avg Entry Price Level", but then the market goes down and I add another 1 contract, NOW I want to cancel the previous Take Profit Order, and re-calculate the NEW "Avg Entry Price Level" for the 2 contracts, and put a NEW Take Profit for the 2 contracts at 5 ticks above the NEW "Avg Entry Price Level".

    Thank you very much

    #2
    Hi Mohammed, thanks for writing in.

    Orders made with the Set methods (SetProfitTarget) can not be canceled. To change the price of an order made with a Set method you can call the method again with a different price and the same signal name. To cancel an order you need to submit an Exit method and use CancelOrder() on that order object. We have a brief example here:

    https://ninjatrader.com/support/help...thod_to_ca.htm

    Kind regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 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
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X