Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancelled expired order: Trail Stop

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

    Cancelled expired order: Trail Stop

    Hello Support,

    I add a LowerTimeFrame Bars into my strategy and encounter Cancelled expired order on the TrailStop, and Target too as it is an OCO pair. If I just comment out the Lower Time Frame Bars, the issue does not arise.

    What can possibly cause the issue ? How can I troubleshoot this? Attached is the output file when it happens.

    Thanks.

    Best Regards,

    Edward K.
    Attached Files

    #2
    Hello Edward K,
    Orders submitted via the Set methods (like SetTraialStop etc) are valid for the primary bar only. If your strategy is a multi-series strategy then please try using the Exit() methods to exit the trades.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hello Joydeep,

      I has not done anything to the orders, why it is cancelled by NT? I recall I did not experience this using some earlier NT7 release.

      Are you saying I should not use SetTrailStop, instead issue my own ExitLongStop and trail it with my own code, ExitLongLimit for the target upon order fill update?

      Thanks.

      Best Regards.
      Edward K.

      Comment


        #4
        Hello,

        When using the Set..() order methods, there is not an option to specify which bar it is submitted to.

        By default, orders are re-submitted on each call of the OnBarUpdate() method. If the order is not re-submitted, the order is then cancelled. Since you cannot specify which bar the Set method is using, it will be cannceld on the call of OnBarUpdate()

        If you would like to specify the barsInProgress the orders are running from, you will have to use the ExitLongLimit or ExitLongStop. Please see our Help Guide on Working with a Multi-Instrument Strategy:

        MatthewNinjaTrader Product Management

        Comment


          #5
          Hello,

          When you say by default, you mean it is done by NT and transparent to the strategy that the TrailStop and Target are resubmitted (strategy does not do anything on it). So which Bar it is running from should not matter right. The behaviour is not consistent, if NT cancells unfilled orders at end of any next OnOrderUpdate, NT correct behaviour should be resubmit all unfilled orders independent of which bars, to ensure the behaviour is consistent! If not why does NT resubmit unfilled orders in the first place (when there is not other timeframe bars) ?

          Thanks.

          Best Regards,
          Edward K.

          Comment


            #6
            Hello Edward K,
            To assist you further can you please send a toy NinjaScript code* replicating the behavior to support[AT]ninjatrader[DOT]com

            Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

            I look forward to assisting you further.

            *The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              Hello Joydeep,

              I assembled a toy strategy late yesterday. Somehow the issue did not crop up on that strategy. I would check further and revert back,

              Thanks.

              Best regards,
              Edward K.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              671 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              379 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              111 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              575 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              582 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X