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 Segwin, 05-07-2018, 02:15 PM
    14 responses
    1,788 views
    0 likes
    Last Post aligator  
    Started by Jimmyk, 01-26-2018, 05:19 AM
    6 responses
    837 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,293 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    13 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    11 responses
    63 views
    0 likes
    Last Post halgo_boulder  
    Working...
    X