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 andrewtrades, Today, 04:57 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        3 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
        6 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