TWSLink for linking your Application to TWS

Discussion in 'Trading Software' started by maxchinaski, Apr 24, 2007.

  1. maxchinaski,

    When I call GET_POSITIONS, it should return a postive integer for the number of shares or contracts the account is long in a given instrument. It should return a negative integer for the number of shares or contracts the account is short in the instrument.

    Documentation says that a return value of -3 means contract is not found. What happens if you're short 3 contracts or shares?

    Also, is there a way to generate OCO orders?

    Lastly, is there a way to retrieve the filled price of an executed order?

    thanks,

    rt
     
    #41     Aug 6, 2008
  2. I just figured out how to generate OCO.

    After function PLACE_ORDER is called, use SET_ORDERVAL to create an OCA group and OCA type.

    Thanks,

    rt
     
    #42     Aug 6, 2008
  3. and, duh, We have GET_EXECUTION_PRICE to find the fill price.

    One more question: is there a way to deactivate and reactivate an existing order, instead of cancelling it and re-sending the order later?

    rt
     
    #43     Aug 6, 2008