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 NullPointStrategies, Today, 05:17 AM
    0 responses
    41 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X