Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Clarification wrt SetStopLoss cancellation

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

    Clarification wrt SetStopLoss cancellation

    Hello,

    I want to make sure that I am understanding the documentation correctly with respect to SetStopLoss and its life cycle.

    https://ninjatrader.com/support/help...d_approach.htm

    On the above page it states the following:
    • By default, orders submitted via Entry() and Exit() methods automatically cancel at the end of a bar if not re-submitted
    Is this also applicable to SetStopLoss()?
    Is SetStopLoss() automatically cancel at the end of a bar is not re-submitted?

    In other words, there is no isLiveUntilCancelled parameter for SetStopLoss().

    Therefore, if I used something similar to the following code, is it necessary to resubmit the SetStopLoss() for every OnBarUpdate() that is called on the primary series for a multi-time frame strategy?

    Code:
     protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
    {
    
         if (execution.Order.OrderState == OrderState.Filled)
         {
                stopOrder = SetStopLoss(CalculationMode.Price, someValue);
    
         }
    
    
    }

    #2
    Hello Epistemophilic,

    Thanks for your first post on the forums!

    The set methods will continue to provide the orders until the entry position is closed, there is no need for additional coding.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 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
    120 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