Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

StopLoss Hit

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

    StopLoss Hit

    If Variable0 = 1, Is there any way of stating in a strategy that if the stoploss is hit, then Variable0 == 0; ?????

    #2
    edgeliner

    You can use either the OnOrderUpdate() and OnExecution() methods to check that your stop loss was filled/executed. Once this occurs, you can set the Variable value as desired.

    Please review our Reference Sample which uses these two Methods with SetStopLoss and SetProfitTarget:

    The OnOrderUpdate() and OnExecution() methods are reserved for experienced programmers. Instead of using Set() methods to submit stop-loss and profit target orders, you can submit and update them manually through the use of IOrder and IExecution objects in the OnOrderUpdate() and OnExecution() methods. The OnOrderUpdate()
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

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