Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetTrailStop frequency

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

    SetTrailStop frequency

    Hi,

    I read through a dozen or so threads regarding SetTrailStop in the strategy.

    Is the frequency that this is updated every tick? Can it be adjusted, like with ATM, or is it locked at 1 tick?

    Also, is the best way to 'reset' the trailstop amount when flat to call it using an outrageous stop, like 9999 ticks, or is it ok to just re-enter the trailstop on every entry like EnterLong() then followed by a SetTrailStop() ?

    Mike

    #2
    I believe it is updated either on the close of the bar or every tick depending on what the "Calculate on bar close" parameter is set to. No way to change the frequency as per ATM strategy. Reset it when flat but don't use 9999 since this could be an invalide order price. You would have to reset it to the original stop offset amount you desire.
    RayNinjaTrader Customer Service

    Comment


      #3
      Ray,

      So if I am using 5 minute bars, the trail won't follow the bid until every 5 minutes? That is a lot of lost profit. Am I understanding right?

      Is there a way to run the trailing stop in 'every tick, calculate on bar close=false' mode while keeping the rest of the strategy the same (look at bars every 5 minutes)?

      Mike

      Comment


        #4
        For instance...

        OnBarUpdate for trailing stop

        OnBarClose for rest of strategy

        while calculateonbarclose = false ?

        Mike

        Comment


          #5
          Sure, run tick by tick by check your strategy logic in OnBarUpdate() only when:

          FirstTickOfBar == true

          However, keep in mind that you are the next bar, so to check values for the bar close check the value of 1 bar ago.
          RayNinjaTrader Customer Service

          Comment


            #6
            Ray,

            Thank you, that is a new feature to me, I will play with it!

            I do hope NT7 will allow tick-by-tick (calculateonbarclose = false) within backtesting, would make this easier, having to manually go through one day at a time of market replay to test these things is enough to shoot yourself!

            Thanks again.

            Mike

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            576 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 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
            553 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X