Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why is my stoploss getting canceled here?

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

    Why is my stoploss getting canceled here?

    Here is the order and execution for a market short order:

    10/20/2010 9:50:37 AM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=700.6 Currency=0 Simulated=False
    10/20/2010 9:50:37 AM Entered internal SetStopTarget() method: Type=Target FromEntrySignal='' Mode=Price Value=696.9 Currency=0 Simulated=False
    10/20/2010 9:50:37 AM Entered internal PlaceOrder() method at 10/20/2010 9:50:37 AM: BarsInProgress=0 Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='ptt Short' FromEntrySignal=''
    Order='dd6b2f32dd3343c7808f8e8a9b4a357b/Replay101' Name='ptt Short' State=PendingSubmit Instrument='TF 12-10' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Day OverFill=False Oco='' Filled=0 Fill price=0 Token='dd6b2f32dd3343c7808f8e8a9b4a357b' Gtd='1/1/0001 12:00:00 AM'
    Order='dd6b2f32dd3343c7808f8e8a9b4a357b/Replay101' Name='ptt Short' State=Accepted Instrument='TF 12-10' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Day OverFill=False Oco='' Filled=0 Fill price=0 Token='dd6b2f32dd3343c7808f8e8a9b4a357b' Gtd='1/1/0001 12:00:00 AM'
    Order='dd6b2f32dd3343c7808f8e8a9b4a357b/Replay101' Name='ptt Short' State=Working Instrument='TF 12-10' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Day OverFill=False Oco='' Filled=0 Fill price=0 Token='dd6b2f32dd3343c7808f8e8a9b4a357b' Gtd='1/1/0001 12:00:00 AM'
    Order='f96c0b30e99b4584963253ad8fc54031/Replay101' Name='Stop loss' State=PendingSubmit Instrument='TF 12-10' Action=BuyToCover Limit price=0 Stop price=700.6 Quantity=1 Type=Stop Tif=Day OverFill=False Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f96c0b30e99b4584963253ad8fc54031' Gtd='1/1/0001 12:00:00 AM'
    Order='f96c0b30e99b4584963253ad8fc54031/Replay101' Name='Stop loss' State=Accepted Instrument='TF 12-10' Action=BuyToCover Limit price=0 Stop price=700.6 Quantity=1 Type=Stop Tif=Day OverFill=False Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f96c0b30e99b4584963253ad8fc54031' Gtd='1/1/0001 12:00:00 AM'
    Order='f3c1159f957b4535867bfdfed764f3fb/Replay101' Name='Profit target' State=PendingSubmit Instrument='TF 12-10' Action=BuyToCover Limit price=696.9 Stop price=0 Quantity=1 Type=Limit Tif=Day OverFill=False Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f3c1159f957b4535867bfdfed764f3fb' Gtd='1/1/0001 12:00:00 AM'
    Order='f3c1159f957b4535867bfdfed764f3fb/Replay101' Name='Profit target' State=Accepted Instrument='TF 12-10' Action=BuyToCover Limit price=696.9 Stop price=0 Quantity=1 Type=Limit Tif=Day OverFill=False Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f3c1159f957b4535867bfdfed764f3fb' Gtd='1/1/0001 12:00:00 AM'
    Order='f3c1159f957b4535867bfdfed764f3fb/Replay101' Name='Profit target' State=Working Instrument='TF 12-10' Action=BuyToCover Limit price=696.9 Stop price=0 Quantity=1 Type=Limit Tif=Day OverFill=False Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f3c1159f957b4535867bfdfed764f3fb' Gtd='1/1/0001 12:00:00 AM'
    Order='dd6b2f32dd3343c7808f8e8a9b4a357b/Replay101' Name='ptt Short' State=Filled Instrument='TF 12-10' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Day OverFill=False Oco='' Filled=1 Fill price=699.8 Token='dd6b2f32dd3343c7808f8e8a9b4a357b' Gtd='1/1/0001 12:00:00 AM'
    Execution='f0b1eca0f03249d7a60150fe3f9304ed' Instrument='TF 12-10' Account='Replay101' Name='ptt Short' Exchange=Default Price=699.8 Quantity=1 Market position=Short Commission=2.165 Order='dd6b2f32dd3343c7808f8e8a9b4a357b' Time='10/20/2010 9:50:37 AM'
    10/20/2010 9:50:37 AM Cancelled expired order: BarsInProgress=0: Order='f96c0b30e99b4584963253ad8fc54031/Replay101' Name='Stop loss' State=Accepted Instrument='TF 12-10' Action=BuyToCover Limit price=0 Stop price=700.6 Quantity=1 Strategy=' ptt Strategy Builder' Type=Stop Tif=Day Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f96c0b30e99b4584963253ad8fc54031' Gtd='12/1/2099 12:00:00 AM'
    Order='f96c0b30e99b4584963253ad8fc54031/Replay101' Name='Stop loss' State=PendingCancel Instrument='TF 12-10' Action=BuyToCover Limit price=0 Stop price=700.6 Quantity=1 Type=Stop Tif=Day OverFill=False Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f96c0b30e99b4584963253ad8fc54031' Gtd='1/1/0001 12:00:00 AM'
    Order='f96c0b30e99b4584963253ad8fc54031/Replay101' Name='Stop loss' State=Cancelled Instrument='TF 12-10' Action=BuyToCover Limit price=0 Stop price=700.6 Quantity=1 Type=Stop Tif=Day OverFill=False Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f96c0b30e99b4584963253ad8fc54031' Gtd='1/1/0001 12:00:00 AM'
    Order='f3c1159f957b4535867bfdfed764f3fb/Replay101' Name='Profit target' State=PendingCancel Instrument='TF 12-10' Action=BuyToCover Limit price=696.9 Stop price=0 Quantity=1 Type=Limit Tif=Day OverFill=False Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f3c1159f957b4535867bfdfed764f3fb' Gtd='1/1/0001 12:00:00 AM'
    Order='f3c1159f957b4535867bfdfed764f3fb/Replay101' Name='Profit target' State=Cancelled Instrument='TF 12-10' Action=BuyToCover Limit price=696.9 Stop price=0 Quantity=1 Type=Limit Tif=Day OverFill=False Oco='f0b1eca0f03249d7a60150fe3f9304ed' Filled=0 Fill price=0 Token='f3c1159f957b4535867bfdfed764f3fb' Gtd='1/1/0001 12:00:00 AM'
    All of this happens in the same tick. The stoploss is set to 700.6, the market short is placed and executed. Immediately after the execution, the stop order is canceled because it expired?? Why is it doing that? Stoploss orders do not expire.

    Thanks!
    Bryan

    #2
    Correct, the Set() methods should not expire - which eaxct NT version are you using here?

    Comment


      #3
      7.0.0.22 is it.

      Comment


        #4
        By the way, this problem only happens when I have Calculate on Bar Close = false in the strategy. If I set it to true, then the stop is not canceled and it seems to work correctly.

        Comment


          #5
          Thanks for confirming the version and reporting in, we'll look into reproducing here on those settings.

          Comment


            #6
            OK no problem. Let me know if you need any help reproducing it. You can connect remotely to my PC and see it if you want.

            Comment


              #7
              Was this a multi-series strategy?
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                No, just one chart, one strategy.

                Comment


                  #9
                  Bryan, I tried on my end here but was unsuccessful to reproduce it - could you please contact me directly at support at ninjatrader dot com and attach the script that is giving you this issue?

                  Thanks

                  Comment


                    #10
                    I would rather not distribute our proprietary code. Can you reproduce by connecting to my PC?

                    Comment


                      #11
                      Originally posted by cassb View Post
                      I would rather not distribute our proprietary code. Can you reproduce by connecting to my PC?
                      I can understand, but would need to see the code anyways in order to reproduce / check into - can you just plugin generic logic and remove your IP to just enabled us to reproduce the SetStopLoss issue you've seen? I tried today on COBC false with a simple, single series strategy on the ES and the stop persisted until hit.

                      Comment


                        #12
                        It may be the complexity of my code that's causing the issue, so I'm not sure if just creating a new strategy with generic code would work -- isn't this what you are doing?

                        You can connect to me and then look at the code here if you want. I just don't want to send out uncompiled code to anyone.

                        Comment


                          #13
                          Yes, I was entering on the first real time bar after starting it with a market order and then submitting a price wise stop, all in COBC = false.

                          As we just released RC1 of NT7, would you mind retesting on this version if the behavior you see would have changed?

                          We could take a look remotely at the code, but we would still need to drill the issue down to a reproducible scenario if we're dealing with a bug here.

                          Set() methods by themselves should not expire even with COBC = false.

                          Comment


                            #14
                            OK, can you give me a link to the RC1 download? I'll try it and let you know.

                            Comment


                              #15
                              It is on the download page available here: http://www.ninjatrader.com/webnew/do...rent_users.htm
                              Josh P.NinjaTrader Customer Service

                              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
                              370 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
                              577 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X