Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Partial Exits and StopLoss in Managed Approach

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

    Partial Exits and StopLoss in Managed Approach

    Hello,

    I'm testing my strategy (managed Approach), which send a limit order with 3 contracts of CL and set a Stop Loss and 3 different partial exit targets (1 contract each).

    At the first step, SetStopLoss works fine, it open the stop order with 3 contracts when the Limit Order fills, but there is a problem then.

    When the script close the first contract according to logic (remaining 2 contracts from the original 3 ones), the Stop Loss order does not refresh the contracts quantity (this remains with the 3 contracts). The same happens when the others partial targets trigger, the Stop Loss order remains with the original 3 contracts, never follow the sequence quantity of contracts that really remains live.

    How could I do for the SL order updates the number of contracts remaining in the position?

    BR,
    Fede

    #2
    Hello federicoo,

    Thank you for your post.

    This behavior is expected with the managed order methods. You can work around this in the managed order approach by using three unique entries with three individual signalNames, then use three individual SetStopLoss methods each that call the unique signalName for their entry order.

    For example, using the EnterLong for market orders (same concept applies to Limits and Stops):
    Code:
    EnterLong(1, "enter1");
    EnterLong(1, "enter2");
    EnterLong(1, "enter3");
    
    SetStopLoss("enter1", CalculationMode.Ticks, 5, false);
    SetStopLoss("enter2", CalculationMode.Ticks, 5, false);
    SetStopLoss("enter3", CalculationMode.Ticks, 5, false);
    Please let me know if you have any questions.

    Comment


      #3
      I will do this, but could I know when each one of these limit orders fills? How can I do this under OnExecution ?

      Thanks

      Comment


        #4
        Hello federicoo,

        Thank you for your response.

        If you use the signalNames then you can use execution.Order.Name.

        Please let me know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        567 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        548 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X