Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancelling SetStopLoss or SetParabolicStop and resubmitting SetParabolicStop

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

    Cancelling SetStopLoss or SetParabolicStop and resubmitting SetParabolicStop

    Hi.

    So we want to be able to set an initial stop loss order then later change it into a parabolic stop. We've tried the following in backtesting and realtime strategy using market replay.

    Initially tried to do the initial stop loss using SetStopLoss(), then use SetParabolicStop() to change existing stop loss but that doesn't work.
    Next, tried using CancelOrder() on existing stop loss order then call SetParabolicStop() and order didn't get cancelled.
    Also, tried just having initial stop loss using SetParabolicStop() but with 0 accel/accelmax/accelstep then later resubmit using another SetParabolicStop() call and that didn't work. Cancelling that parabolic stop order using CancelOrder() before doing another SetParabolicStop() call didn't work either.

    Is there a certain condition that CancelOrder() won't work on a stop loss order? Thanks.

    #2
    Hello cmarkb,

    Thanks for your post.

    The set methods, once used in a strategy will continue to function, they cannot be stopped, halted, or canceled.

    When a SetStopLoss() is used, the trailing stops would not function. "The SetTrailStop() method can NOT be used concurrently with the SetStopLoss() or SetParabolicStop() method for the same position, if any of methods are called for the same position (fromEntrySignal) the SetStopLoss() will always take precedence. You can however, use all three methods in the same strategy if they reference different signal names.". Reference: https://ninjatrader.com/support/help...ttrailstop.htm



    Comment


      #3
      Hi PaulH,

      Thanks for the reply.

      Is there a way to modify a currently active Parabolic Stop?

      Comment


        #4
        Hello cmarkb,

        Thanks for your post.

        Yes, in the OnBarUpdate() you can dynamically adjust any set method. Update: 12-16-2021 - Development has determined that for the SetParabolicStop() it cannot be adjusted dynamically, so the preceding statement specifying "any" is incorrect. The help guide will be updated to correct this.

        Please keep in mind this note (that is true in all the Trailing Stop methods: "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"
        Reference: https://ninjatrader.com/support/help...abolicstop.htm Update: 12-16-2021 - Development has determined that for the SetParabolicStop() it cannot be adjusted dynamically. The help guide will be updated to correct this.
        Last edited by NinjaTrader_PaulH; 12-16-2021, 09:12 AM.

        Comment


          #5
          Hi PaulH,

          Can you clarify on the set methods being able to dynamically adjust specifically for SetParabolicStop():

          - 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

          1) Does this mean we can only set a parabolic stop (PS1) only once and that's before an entry order is submitted?

          2) If we want to change that same parabolic stop (PS1) we won't be able to do so (because then strategy isn't flat)?
          2.1) Calling SetParabolicStop() at this point (with a working entry order) will result in nothing happening on PS1? Or does it generate a new parabolic stop (PS2) in the same position as PS1?

          3) Only after we've exited current trade (when strategy flattens) will calling SetParabolicStop() generate a modified parabolic stop order (position different from PS1).

          Thanks.

          Comment


            #6
            Hello cmarkb,

            Thanks for your reply.

            In the set methods, when you change it, the set methods will maintain the last "setting" of its parameters. Using setstoploss as an easy example, if you start with a 20 tick stop loss see that price is well into profit, and then make a change to the stop to say use CalculationMode.Price and set the stop to Position.AveragePrice (as a breakeven point). If when that trade has closed and a new trade begins, the stop will be at whatever price level Position.AveragePrice was at in the prior trade which may be completely wrong and be rejected. We recommend that prior to the new order that the stop is set, for example:

            if (conditions to enter the order)
            {
            SetStopLoss(CalculationMode.Ticks, 20);// set the stop first then place order
            //EnterLong or EnterShort
            }

            In testing the SetParabolicStop() today I observed that the stop did not adjust mid order as I expected and as the documentation indicates. We are looking into this and will update you about the SetParabolicStop() when we have completed our review. I just wanted to get this reply out to you today so that you know we are looking at this question. Thanks in advance for your patience. Update: 12-16-2021 - Development has determined that for the SetParabolicStop() it cannot be adjusted dynamically. The help guide will be updated to correct this.
            Last edited by NinjaTrader_PaulH; 12-16-2021, 09:13 AM.

            Comment


              #7
              Hi PaulH,

              > In the set methods, when you change it, the set methods will maintain the last "setting" of its parameters.
              Ahhh okay. Thanks.

              > In testing the SetParabolicStop() today I observed that the stop did not adjust mid order as I expected and as the documentation indicates. We are looking into this and will update you about the SetParabolicStop() when we have completed our review. I just wanted to get this reply out to you today so that you know we are looking at this question. Thanks in advance for your patience.
              Cool. Thanks.

              Comment


                #8
                Hello cmarkb,

                Thanks for your patience while we reviewed the usage of SetParabolicStop in a dynamic manner.

                Our development team has advised that the setParabolicStop should not be adjusted while it is in use. Adjusting while in use is unsupported.

                We will be updating the help guide, likely by the next release, perhaps sooner, for SetParabolicStop to make that clear as that is different than what the current guide advises and would also be different than other trailing stops say.

                I will be adjusting my previous response in this thread to reflect the new information.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                46 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                126 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                66 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