Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Possible Issue with OrderId Sent from strategy

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

    Possible Issue with OrderId Sent from strategy

    Hello

    We are using the NTNewOrderId() to generate a unique order id for a stop order we are submitting to IB via NT. This works as a GUID is assigned to our exitID variable.

    However, looking at the logs of NT, the following appears to happen:

    12/05/2010 16:51:00 ATI AT, 'Place;xxxxxxx;ES 06-10;SELL;12;STOP;0;1149.75;GTC;;90E264FB5E5741FBAAD D4B19F627830C;;' processing

    This is our call with teh GUID returned fron NTNewOrderId()

    But then in NT, the log states:

    12/05/2010 16:51:00 Order Order='06d3d6c6027448189d82a6269f803eb3/DU66141' Name='' New State=PendingSubmit Instrument='ES 06-10' Action=Sell Limit price=0 Stop price=1149.75 Quantity=12 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''

    Now this appears to be the actual order NT is submitting to IB. But if I am right, NT has assigned its own GUID as the order id?

    As a result, we cannot modify or cancel the stops once submitted.

    Anyone else had similar problems? Anyone know how or why this could happen?

    Regards

    #2
    Hello normster,

    Unfortunately this is as expected.

    You can change or cancel orders using the 'int Command' as per the link below.


    int Command(string command, string account, string instrument, string action, int quantity, string orderType, double limitPrice, double stopPrice, string timeInForce, string oco, string orderId, string strategy, string strategyId)

    Function for submitting, cancelling and changing orders, positions and strategies. Refer to the Commands and Valid Parameters section for detailed information. A return value of 0 indicates success and -1 indicates an error. The Log tab will list context sensitive error information.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Thanks for that

      If I understand you correctly, there is no point us calling the NTNewOrderId() function as the order ID I pass will not be the one used by NT when placing the order with IB?

      If that is the case, how can I determine the order ID NT assigned to the (for example) BUY market order I submitted.

      Looking at the specification, when I call change or cancel, the orderID is required. How would I get that orderID?

      Regards

      Comment


        #4
        Hello normster,

        You can get all order ID's using:

        string Orders(string account)

        This will get a string of order ID's of all orders of an account separated by '|'.

        If there is no user defined order ID initially provided, the order ID reflected in the log file will be used, since it is guaranteed to be unique.

        Subsequently you can change/cancel using the approriate command.
        JasonNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by helpwanted, Today, 03:06 AM
        1 response
        16 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        387 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X