Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NTCancelAllOrders()

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

    NTCancelAllOrders()

    Hello,

    I am using EFS + NT DLL to trade IB TWS accounts. If I enter a long position and a short position, each of them is protected with an stop loss and profit target OCO pair orders. Because both position are of the same size, after orders are entered, actually there is no contracts in the account and there are only four orders being active. In this situation, NTClosePosition("") can not cancel those active orders (which only works when there is no empty position). To cancel those stop loss and profit target orders, I have to use NTCancelAllOrders(). However each time NT pops out an error message "Can't find order with id = xx Attached Order blah blah blah". Since actually all four orders are already cancelled, maybe NT should be smart enough to suppress that error message. Otherwise if I really leave the program running untended, eventually there would be a lot of such message windows shown on the screen and wasting computer resource.

    - Clearpicks

    #2
    Thanks for the suggestion.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    146 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X