Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancelled order due to end of session handling

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

    #16
    I'm running my strategy tick by tick with CalculateOnBarClose = false within the Initialize() method.

    Comment


      #17
      Ok. What about the bar timestamps?
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        Where do I get a timestamp of a tick from, please?

        Comment


          #19
          Ctrl + D and mousing over the bar will provide you with the timestamp of that bar.
          Josh P.NinjaTrader Customer Service

          Comment


            #20
            Ok thank you, I'm going to reproduce the error and be back with the timestamp.

            Comment


              #21
              Josh,

              the timestamp of the tick in the chart which triggered the exit order which was cancelled has got the same time like the tick in the output window.

              Comment


                #22
                Right. That is expected. What I was looking for were the timestamps of the bar before and after when the order was cancelled. Please provide the time and date for these. Thanks.
                Josh P.NinjaTrader Customer Service

                Comment


                  #23
                  - date of all surrounding ticks is today
                  - time is 19:19:24 19:19:34 19:19:35

                  Comment


                    #24
                    Ok brima. Thanks for the info. Can you email me a simple-as-possible strategy that I can use to reproduce this on our end? josh.peng [at] ninjatrader [dot] com. Thank you for your patience and help in this matter.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      Yes, I'll do that, but give me this weekend please.

                      Comment


                        #26
                        Cancelled orders despite ExitOnClose==false

                        This is a pretty old thread, but I've just had the same issue.
                        ExitOnClose is DEFINITELY false, yet my stoploss and profit target orders are getting cancelled at midnight. (This is the chart's properties' Session Begins and Session End times.)
                        The position just stays stuck (in this case, Short) until forever.
                        NT 6.5.1000.13
                        saltminer

                        19/06/2009 12:00:00 AM Cancelled order due to end of session handling: BarsInProgress=0: Order='NT-00098/Sim101' Name='Stop loss' State=Working Instrument='6E ##-##' Action=Sell Limit price=0 Stop price=1.3902 Quantity=1 Strategy='AlexGannSwingTrader2' Type=Stop Tif=Day Oco='NT-00064' Filled=0 Fill price=0 Token='0e1cd9a35efb41848b94c0ff103c9600' Gtd='1/12/2099 12:00:00 AM'
                        19/06/2009 12:00:00 AM Cancelled order due to end of session handling: BarsInProgress=0: Order='NT-00099/Sim101' Name='Profit target' State=Working Instrument='6E ##-##' Action=Sell Limit price=1.3925 Stop price=0 Quantity=1 Strategy='AlexGannSwingTrader2' Type=Limit Tif=Day Oco='NT-00064' Filled=0 Fill price=0 Token='c67f71f56ab841e1bb4881d5b032cb0b' Gtd='1/12/2099 12:00:00 AM'

                        P.S. A workaround of setting the ProfitTarget and StopLoss once every bar DOESN'T HELP. After the orders have been cancelled, new SetProfitTarget() and SetStopLoss() commands don't attach to the open position. It still stays open forever.
                        Last edited by saltminer; 12-09-2009, 04:28 PM.

                        Comment


                          #27
                          saltminer,

                          Do you have orders set to Gtc instead of Day?
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #28
                            Of course! I hadn't thought past that parameter being relevant for limit orders to enter. So now I'm clear they are relevant for stops and profit targets for current positions too.
                            Thanks Josh.

                            Interesting how a stop and a profit target couldn't be re-attached the next day to an open position.

                            Comment


                              #29
                              Cancelled order due to end of session handling

                              I found a bug with that error.

                              Every settings on default, timeinforce set to day.

                              When there are two different instument in the strategy and the second instrument has no more tick that day let say at 20:00 then the strategy throws out the main bar stop/target with the
                              'Cancelled order due to end of session handling' message ,
                              more of a problem is that cancellation is invisible , I was not able to catch it in the OnOrderUpdate.

                              Could you look into it?
                              Thanks
                              Hatori.

                              Comment


                                #30
                                Hello,

                                I will have someone reply to you on Monday. Thank you for your patience.
                                DenNinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                590 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                342 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                103 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                555 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                552 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X