Announcement

Collapse
No announcement yet.

cancelAllOrders and closeAllPositions

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

  • cancelAllOrders and closeAllPositions

    The API cancelAllOrders() closes all active orders in TWS no matter whether the orders are entered manually, by the IBBridge or other programs, right?

    closeAllPositions() flats all positions in an IB account, am I right?

    - CLearpicks

  • #2
    Re: cancelAllOrders and closeAllPositions

    Hello Clearpicks,

    Originally posted by clearpicks
    The API cancelAllOrders() closes all active orders in TWS no matter whether the orders are entered manually, by the IBBridge or other programs, right?
    I believe that to be correct. Have you tried it? If so, what happened? Logically I would think that the broker would have to have some way of flagging which orders were entered manually or via a script to prevent manual orders from being cancelled. I don't believe that functionality exists.

    closeAllPositions() flats all positions in an IB account, am I right?

    - CLearpicks
    Correct.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment

    Working...
    X