Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order ID does not exist error when trying to cancel an order

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

    Order ID does not exist error when trying to cancel an order

    We have an automated strategy running on Esignal placing orders on IB via Ninja Trader

    We wish to cancel a stop and place a new one, however the stops that have been placed before are not being cancelled. I have included the log below:

    2/18/2011 10:39:40 AM,Order,Order='1002560254/XXXXXXXX' Name='' New state=Accepted Instrument='FDAX 03-11' Action=Buy Limit price=0 Stop price=7411 Quantity=3 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:40 AM,Default,Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. 2109,
    2/18/2011 10:39:40 AM,Order,Order='6eddb4f1653a4ac7997dac55f54e4fbf/XXXXXXXX' Name='' New state=PendingSubmit Instrument='FDAX 03-11' Action=Buy Limit price=0 Stop price=7411 Quantity=3 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:40 AM,Order,Submitting order without strategy...,
    2/18/2011 10:39:40 AM,ATI,AT, 'Place;XXXXXXXX;FDAX 03-11;BUY;3;STOP;0;7411;DAY;;;;' processing ,
    2/18/2011 10:39:40 AM,ATI,OIF, 'Cancel;XXXXXXXX;;;0;;0;0;;;E678FDD39E4341E6B51438 1EEA533197;;' order with ID/Name'E678FDD39E4341E6B514381EEA533197' does not exist,
    2/18/2011 10:39:40 AM,ATI,AT, 'Cancel;XXXXXXXX;;;0;;0;0;;;E678FDD39E4341E6B51438 1EEA533197;;' processing ,
    2/18/2011 10:39:38 AM,Order,Order='1002560253/XXXXXXXX' Name='' New state=Accepted Instrument='FDAX 03-11' Action=Buy Limit price=0 Stop price=7412 Quantity=3 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:38 AM,Default,Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. 2109,
    2/18/2011 10:39:38 AM,Order,Order='2a21468675c84cb49162d4d26907d0eb/XXXXXXXX' Name='' New state=PendingSubmit Instrument='FDAX 03-11' Action=Buy Limit price=0 Stop price=7412 Quantity=3 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:38 AM,Order,Submitting order without strategy...,
    2/18/2011 10:39:38 AM,ATI,AT, 'Place;XXXXXXXX;FDAX 03-11;BUY;3;STOP;0;7412;DAY;;;;' processing ,
    2/18/2011 10:39:38 AM,ATI,OIF, 'Cancel;XXXXXXXX;;;0;;0;0;;;F30ECF825BCE413097E18C A00BB44567;;' order with ID/Name'F30ECF825BCE413097E18CA00BB44567' does not exist,
    2/18/2011 10:39:38 AM,ATI,AT, 'Cancel;XXXXXXXX;;;0;;0;0;;;F30ECF825BCE413097E18C A00BB44567;;' processing ,
    2/18/2011 10:39:36 AM,Position,Instrument='FDAX 03-11' Account='XXXXXXXX' Avg price=7393.17 Quantity=6 Market position=Short Operation=Update Currency=Euro,
    2/18/2011 10:39:36 AM,Order,Order='1002560252/XXXXXXXX' Name='' New state=Accepted Instrument='FDAX 03-11' Action=Buy Limit price=0 Stop price=7414 Quantity=3 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:36 AM,Default,Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. 2109,
    2/18/2011 10:39:36 AM,Order,Order='79e43fde53674cbb98bc16a3484d04b2/XXXXXXXX' Name='' New state=PendingSubmit Instrument='FDAX 03-11' Action=Buy Limit price=0 Stop price=7414 Quantity=3 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:36 AM,Order,Submitting order without strategy...,
    2/18/2011 10:39:36 AM,ATI,AT, 'Place;XXXXXXXX;FDAX 03-11;BUY;3;STOP;0;7414;DAY;;;;' processing ,
    2/18/2011 10:39:36 AM,ATI,OIF, 'Cancel;XXXXXXXX;;;0;;0;0;;;325E830652F544D1946516 29B3916C73;;' order with ID/Name'325E830652F544D194651629B3916C73' does not exist,
    2/18/2011 10:39:36 AM,ATI,AT, 'Cancel;XXXXXXXX;;;0;;0;0;;;325E830652F544D1946516 29B3916C73;;' processing ,
    2/18/2011 10:39:35 AM,Order,Order='1002560251/XXXXXXXX' Name='' New state=Accepted Instrument='FDAX 03-11' Action=Buy Limit price=0 Stop price=7420 Quantity=3 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:35 AM,Default,Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. 2109,
    2/18/2011 10:39:35 AM,Execution,Execution='FDAX 03-11/0000e9b5.4d5e1774.01.01' Instrument='FDAX 03-11' Account='XXXXXXXX' Exchange=Eurex Price=7394 Quantity=3 Market position=Short Operation=Insert Order='1002560250' Time='2/18/2011 10:39:35 AM',
    2/18/2011 10:39:35 AM,Order,Order='1002560250/XXXXXXXX' Name='' New state=Filled Instrument='FDAX 03-11' Action=Sell Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=3 Fill price=7394 Error=NoError Native error='',
    2/18/2011 10:39:35 AM,Order,Order='1002560250/XXXXXXXX' Name='' New state=Working Instrument='FDAX 03-11' Action=Sell Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:35 AM,Order,Order='1002560250/XXXXXXXX' Name='' New state=Accepted Instrument='FDAX 03-11' Action=Sell Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:35 AM,Default,Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. 2109,
    2/18/2011 10:39:35 AM,Order,Order='ee741e3173a94c28b6eb3f76743ff02c/XXXXXXXX' Name='' New state=PendingSubmit Instrument='FDAX 03-11' Action=Buy Limit price=0 Stop price=7420 Quantity=3 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:35 AM,Order,Submitting order without strategy...,
    2/18/2011 10:39:35 AM,ATI,AT, 'Place;XXXXXXXX;FDAX 03-11;BUY;3;STOP;0;7420;DAY;;;;' processing ,
    2/18/2011 10:39:35 AM,Order,Order='7afb04e125e84b3b99bd218806970908/XXXXXXXX' Name='' New state=PendingSubmit Instrument='FDAX 03-11' Action=Sell Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=0 Fill price=0 Error=NoError Native error='',
    2/18/2011 10:39:35 AM,Order,Submitting order without strategy...,
    2/18/2011 10:39:35 AM,ATI,AT, 'Place;XXXXXXXX;FDAX 03-11;SELL;3;MARKET;0;0;GTC;;;;' processing ,

    Any ideas why this is not working?

    Regards

    Norman

    #2
    Welcome to our forums here - where do you get the OrderID for the CancelOrder call from?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      OK, I think I may be doing something stupid here. The code is:

      dll.call("Command", "Place", sAccount, sContractName, sExit, nNumContracts, "STOP", 0, nS, "DAY", "", "", "", "");
      stopId = dll.call("NewOrderId");

      I get the feeling you are going to tell me to call stopId = dll.call("NewOrderId"); first, and pass that orderID to the Place command?

      Regards

      Norman

      Comment


        #4
        Indeed I have answered my own question. Assigning the order ID and passing it in the place command was the answer.

        Thanks

        Comment


          #5
          Norman, correct sorry for my late reply.
          BertrandNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by andrewtrades, Today, 04:57 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by chbruno, Today, 04:10 PM
          0 responses
          5 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          436 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          7 views
          0 likes
          Last Post FAQtrader  
          Started by rocketman7, Today, 09:41 AM
          5 responses
          19 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X