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 cmoran13, Yesterday, 01:02 PM
        0 responses
        30 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        22 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        160 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        95 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        148 views
        2 likes
        Last Post CaptainJack  
        Working...
        X