TWS API order status : partially filled?

Discussion in 'Automated Trading' started by TraDaToR, Mar 22, 2009.

  1. Sorry, but I'm not good enough in DDE-issues. In C++ I monitor the orderStatus callback. It is call from the TWS each time the status or the 'fillstatus' of an order changes. So it is quite simple to keep track of the open orders.
     
    #11     Mar 22, 2009
  2. Yes I think so. Only 'submitted' orders can be filled.
     
    #12     Mar 22, 2009
  3. TraDaToR

    TraDaToR

    I have to change everything I did today... :mad:

    I will see tomorrow...

    Good night or good afternoon for you in the US.
     
    #13     Mar 22, 2009
  4. Toland

    Toland

    I found, that IB API can mark
    partially filled orders as it want:
    sometimes it "filled", sometimes "canceled", etc.

    The best way to handle this situation is to
    check all orders for order.remaining and order.filled parameters.

    if ( order.remaining > 0 ) and
    ( order.filled > 0 ) then
    Do something
     
    #14     Mar 22, 2009
  5. TraDaToR

    TraDaToR

    OMG... Fuzzy logic integrated in the code instead of the rules, IB is really cutting edge...
     
    #15     Mar 22, 2009
  6. FaceOff

    FaceOff

    To determine if you have been fully filled, simply compare the execution.m_cumQty (if you are using Java) from the execution message of execDetails with the amount that you originally ordered. You should keep getting getting execDetails message each time you get an additional fill until you are fully filled.
     
    #16     Mar 22, 2009
  7. TraDaToR

    TraDaToR

    Thanks FaceOff too,

    It's finally working quite well. I had to request executions using "executed" in "ord" req , and then quantify fills using "shares" on "exec" req. There might be a little problem in live if the request is too long and system miss last fills.

    For whatever reason, the "sharesFilled" DDE link doesn't work.

    Thank you all.
     
    #17     Mar 24, 2009