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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X