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 NullPointStrategies, Today, 05:17 AM
    0 responses
    44 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X