Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Shifting Trailing Stop Only On Bar Roll Over

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

    Shifting Trailing Stop Only On Bar Roll Over

    I have a strategy that takes entries during the bar's period - hence calculate on bar close must be set to false. However I need to tell my trailing stop to only advance after a candle has closed (i.e. at the very beginning of the next candle) - or at bar roll-over if you will. It may be worthwhile mentioning that I am doing the trailing stop logic manually so I have much control - not using the SetTrailStop() call to set it. Instead I'm using ExitLongStop() and ExitShortStop() which I am nursing manually in onBarUpdate().

    So I imagine I just need to know when the onBarUpdate() method gets called for a particular candle for the very first time. Yes, I could use Time[0] and use some type of reset mechanism when I see the minute interval change (I'm using minute charts with this) but there must be a more elegant way

    Thanks,

    Molecool
    Last edited by molecool; 02-27-2013, 06:50 AM.

    #2
    You can use FirstTickOfBar to reset your ExitLong/ShortStop() which would move the stop only when a new bar opens.

    We have a reference sample to demonstrate these concepts:



    Please let me know if you have any questions.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Matthew View Post
      You can use FirstTickOfBar to reset your ExitLong/ShortStop() which would move the stop only when a new bar opens.

      We have a reference sample to demonstrate these concepts:



      Please let me know if you have any questions.
      Awesome - that'll work just fine. Many thanks!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      656 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      371 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      579 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X