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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Working...
    X