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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    71 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    43 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    25 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    28 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    56 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X