Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strange StopLoss

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

    Strange StopLoss

    Hello,

    I a strategy, defined a stoploss of 2% for short position in Initialize method
    Code:
    SetStopLoss("Short",CalculationMode.Percent, 0.02, false);
    This is working well except for one trade where stoploss is reached but the lost goes to 7% ...

    I attached screenshot of that trade

    Is someone could explain me why position was not cut around 2 % ?

    Thanks in advance
    Attached Files

    #2
    Hi LaughingDwarf,

    It's not clear from the screenshot what should be happening. Your description says you are specifying a short position but the trade looks long.

    For debugging your strategy, use plenty of Print() statements and TraceOrders output to track strategy order submission. Please see here for help using these debugging tools:


    There is a dedicated sample to exposing order details submitted with Set statements. You can see this sample here:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan,
      Thank you for pointing me that this is a long position and not a short one. And since i put in place a stop at 8% in case of long trade, then it means that stoploss are working perfectly.
      Sorry not to have pay enough attention prior to posting this message.

      Thank you!

      Comment


        #4
        Glad to hear it's working the way you expect. Thanks for the follow- up here, LaughingDwarf.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        368 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
        571 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