Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reason for cancel submitted

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

    Reason for cancel submitted

    Hi,

    A set of orders got canceled and I can't tell the reason why. The log is as follows:

    2020-08-26 08:29:52:696|1|32|Order='6d190da7f526407bb57cf6737 6238ab2/Sim101' Name='Long1' New state='Accepted' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=2 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:696|1|32|Order='6d190da7f526407bb57cf6737 6238ab2/Sim101' Name='Long1' New state='Cancel submitted' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=2 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:698|1|32|Order='6d190da7f526407bb57cf6737 6238ab2/Sim101' Name='Long1' New state='Working' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=2 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:732|1|32|Order='dcd8816844a44df4a9bea3c55 9bc6c3a/Sim101' Name='Long2' New state='Accepted' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:732|1|32|Order='dcd8816844a44df4a9bea3c55 9bc6c3a/Sim101' Name='Long2' New state='Cancel submitted' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:732|1|32|Order='dcd8816844a44df4a9bea3c55 9bc6c3a/Sim101' Name='Long2' New state='Working' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:767|1|32|Order='e837562f35a14ac9a1402c54b 212d8fe/Sim101' Name='Long3' New state='Accepted' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:767|1|32|Order='e837562f35a14ac9a1402c54b 212d8fe/Sim101' Name='Long3' New state='Cancel submitted' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:768|1|32|Order='e837562f35a14ac9a1402c54b 212d8fe/Sim101' Name='Long3' New state='Working' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:826|1|32|Order='6d190da7f526407bb57cf6737 6238ab2/Sim101' Name='Long1' New state='Cancelled' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=2 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:856|1|32|Order='dcd8816844a44df4a9bea3c55 9bc6c3a/Sim101' Name='Long2' New state='Cancelled' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2020-08-26 08:29:52:893|1|32|Order='e837562f35a14ac9a1402c54b 212d8fe/Sim101' Name='Long3' New state='Cancelled' Instrument='CL 10-20' Action='Buy' Limit price=43.34 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''

    What might cause this? It shows no particular error. These are unmanaged orders.

    Thanks.

    #2
    Hello silverm3170, thanks for your post.

    Please turn on TraceOrders in the strategy. That should print out the reason for the cancelation to the NinjaScript output window. Also, consider adding a Print before the order submission to ensure the price is correct.

    I look forward to assisting.

    Comment


      #3
      Three LONG entry LIMIT orders were submitted, either manually or automated.
      Named, LONG1, LONG2, and LONG3.
      Each order was entered at same price 43.34 on CL, in Sim101 acct.

      The orders were all entered at the same time.
      They were all immediately canceled after they were submitted.
      I would suspect they were canceled the same way they were submitted.
      So your answer is: either manually or automated.

      If you have active entry orders, pressing the 'Close' button in Chart Trader
      cancels the entry orders, even if they were submitted via strategy.


      Comment


        #4
        TraceOrders is already true. Does it output more info to the output window than what's in the log file?

        Comment


          #5
          Hello silverm3170, thanks for your reply.

          Yes, it will. TraceOrders should give you a more detailed reason for the order cancelation.

          Comment


            #6
            Originally posted by silverm3170 View Post
            These are unmanaged orders.
            I presume this is happening in a strategy that you coded.
            Your strategy is cancelling each order soon after submission.
            I suspect you don't want this, so there must be a bug in your code.

            Have you tried sprinkling a few Prints around key places in your code?

            Those Prints, combined with TradeOrders=True, make the output window
            an invaluable resource for you ... the interspersing of the output makes it
            even better than the log file.

            Last edited by bltdavid; 08-26-2020, 10:39 AM. Reason: fix typo

            Comment


              #7
              Hi bltdavid,

              Yes they were automated. I didn't interfere with the strategy or take any explicit action to cancel the order.

              Thanks.

              Comment


                #8
                Do you call CancelOrder inside your strategy code?

                Comment


                  #9
                  Yes I do call CancelOrder. The strategy places orders successfully most of the time and this sort of error is rare. I forgot I was calling this; I'll put Print statements to see if these are responsible. Thanks.

                  Comment

                  Latest Posts

                  Collapse

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