Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop Loss doesn't seem to calculate correctly on last SwingHigh value

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

    Stop Loss doesn't seem to calculate correctly on last SwingHigh value

    I'm working on a strategy using the "Swing" indicator. In my example it has a last SwingHigh value of 3696.00. I am setting my Stop Loss like so:

    Code:
    SetStopLoss(@"SX_SAR", CalculationMode.Price, Swing1.SwingHigh[0], false);
    Which should be setting the stop loss to 3696.00, right?

    On my chart I am getting stopped out at 3696.50 instead. Can someone explain why that's happening and how to fix?

    Thanks


    #2
    Hello torch2k,

    Print the value to the output window along with the time of the bar so that you can see what this is returning.
    Enable TraceOrders so that we can what the set method is being submitted with.

    Below is a link to a forum post that demonstrates using prints to understand behavior.


    At what time in the output do you see the trace order information about the set method.?
    Is the Swing1.SwingHigh[0] what you expect on that bar?

    Please save the output to a text file attach the output with your next post.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X