Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancelling SetStopLoss orders

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

    Cancelling SetStopLoss orders

    Hi,

    I am starting to handle my own rejected orders with RealtimeErrorHandling.StopCancelCloseIgnoreRejects and OnOrderUpdate()

    I want to keep the strategy running but close positions and cancel orders.

    I am using Set methods for stop and profit.

    My question is:

    If I exit the open position using Position.Quantity and ExitLong(Qty) will the related SetStopLoss order automatically be closed through the OCO relationship when the position is closed or will I have to also explicitly close the stop and profit orders with CancelOrder()?

    Thanks

    #2
    Hello sjmuk1,

    Yes using Exit market orders would cancel the targets for the associated position.



    •A stop loss order is automatically canceled if the managing position is closed by another strategy generated exit order


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    65 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X