Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question on a function in the TS DLL

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

    Question on a function in the TS DLL

    int NTCancelAllOrders
    Cancels all orders across all connections across all accounts. A return value of 0 indicates success and -1 indicates an error. Success indicates success in submitting the command NOT that all orders are in fact cancelled.

    int NTCancel(string orderId)
    Cancels an order by orderId. A return value of 0 indicates success and -1 indicates an error. Success indicates success in submitting the command NOT that the order has in fact been cancelled.


    I have 2 orders pending one on INTC the other on MSFT.

    NTBuyLimit("A_Trade", 500, 100); // limit order for INTC
    NTBuyLimit("A_Trade", 500, 50); // limit order for MSFT


    Situation: 1) On my chart of MSFT on tradestation the following code gets executed... No code is generated on my chart of INTC
    NTCancelAllOrders;

    Situation: 2) On my chart of MSFT on tradestation the following code gets executed... No code is generated on my chart of INTC
    NTCancel("A_Trade");

    Situation 1) The limit order for both MSFT and INTC get cancelled right??

    Situation 2) I'm not really sure on this one. I know that the limit order for MSFT gets cancelled, but does the limit order for INTC gets cancelled. There was no code that was executed on the INTC chart, however the "order ID" for both the limit order of INTC and MSFT were the same, so would that mean that all orders in the account with the order ID of "A_Trade" gets cancelled or is the only order that will be getting cancelled the symbol of the chart in which the code of generated, and in this case MSFT ?

    I hope that was clear

    Thanks

    #2
    Situation 1) Correct

    Situation 2) I suspect this will not work since you can't submit two orders with the same id value, they need to be unique. The call will only cancel the order associated to the id value passed in.
    RayNinjaTrader 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
    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