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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X