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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    164 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    85 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    126 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    207 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    185 views
    0 likes
    Last Post CarlTrading  
    Working...
    X