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