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 trilliantrader, 04-18-2024, 08:16 AM
    4 responses
    18 views
    0 likes
    Last Post trilliantrader  
    Started by mgco4you, Today, 09:46 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by wzgy0920, Today, 09:53 PM
    0 responses
    9 views
    0 likes
    Last Post wzgy0920  
    Started by Rapine Heihei, Today, 08:19 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Rapine Heihei, Today, 08:25 PM
    0 responses
    10 views
    0 likes
    Last Post Rapine Heihei  
    Working...
    X