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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        60 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        147 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        284 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X