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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    47 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X