Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stoplosses

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

    stoplosses

    Hi

    If I have 2 orders and corresponding 2x stoploss, 2x profit target.

    Do the stoplosses and profit targets close in the order they were placed on the market or is it like last in first out.

    so if
    sl1 and pt1 enter the market first THEN
    sl2 and pt2 enter the market.

    if pt1 is hit then based on the signal names / signal from fields it should be sl1 which is cancelled or is there any way sl2 could be cancelled first?

    #2
    Hello fishbed,

    Thank you for your post.

    If you are using the Set methods (SetProfitTarget, SetStopLoss, etc.) then the associated Stop Loss by entrySignalName will be cancelled - so to your example; if pt1 is hit then sl1 is cancelled.

    If you use specific Exit order methods (ExitLongStopMarket, ExitLongLimit, etc.) then you will need to ensure the orders are associated to the correct entrySignalName - and then the case would be the same as using the Set methods.

    If your orders are not specific to entrySignalNames (the entry orders) then to change this you would use Order objects specifically for each order and check for the fill of an order in the OnOrderUpdate() method and then use CancelOrder() to cancel the order you want.
    Please let me know if you have any questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    55 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    132 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 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
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X