Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetStopLoss

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

    SetStopLoss

    I have a SetStopLoss in the OnBarUpdate() method

    SetTrailStop("L2", CalculationMode.Price, Low[BarsBack] - (.25), false);

    Read this below note but don't know what I should be reseting or where for the timing.

    "Should you call this method to dynamically change the stop loss price in the strategy OnBarUpdate() method, you should always reset the stop loss price/offset value when your strategy is flat otherwise, the last price/offset value set will be used to generate your stop loss order on your next open position "

    #2
    Hi gg80108, please check into this sample here - http://www.ninjatrader-support2.com/...ead.php?t=3222

    It will show you how to reset the stop / trailstop settings to a default value once you're in a flat position.

    Comment


      #3
      changing values

      Dont know how this applies to my situaltion since I'm using trailing stops and the starting value changes rather then being a static value like in these examples..

      It will show you how to reset the stop / trailstop settings to a default value once you're in a flat position.[/quote]

      Comment


        #4
        Correct, this applies to the SetTrailStop also - you want to reset it once you're in a flat position.

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Correct, this applies to the SetTrailStop also - you want to reset it once you're in a flat position.
          When the bool parm for the SetTrailStop is set to false,
          is this order on the brokers server??
          So even though I am using OnBarUpdate to update the stop,, the stop can trigger intrabar and not bar close?


          SetTrailStop("L2", CalculationMode.Price, Low[BarsBack] - (.25), false);

          Comment


            #6
            Correct with this set to 'false', it's not simulated - a real working StopLoss order modified to trail. To check where your orders reside with the different brokerage technologies, please review this link here - http://www.ninjatrader-support2.com/...ead.php?t=5349

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            566 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            547 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            548 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X