Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I know when a stoploss was executed?

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

    How do I know when a stoploss was executed?

    Hello
    I have two questions.
    I have implemented a strategy which builds up a position in the market with maximal 5 entries in the same direction. I have set stoploss in the initialize procedure:
    SetStopLoss(CalculationMode.Percent,.02);

    If I understand right as I can see from tracking the trades, the stop loss is set individually for each entry and therefore executed per entry.

    Question 1:
    Is there a way I can see whether a stop loss is executed? I want to know, because if this happens I do not execute within next days another buy order (produced by my signal).

    Question 2:
    Can I set a stop loss which is relative to the entry price of the whole position? Meaning that if I have for example a position size of 5, the stop loss of 2% is set relative to the average entry price?

    thanks for your feedback
    Andre

    #2
    Hello,

    1- Have you try using OnExecution() or IExecution and doing a check within it:


    2- Maybe you could track the fill prices via IOrder:


    for each order, then do an average of them. Then you could use a % in your SetStopLoss:
    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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