TWSLink for linking your Application to TWS

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
 
Quote from RoughTrader:

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

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
 
Quote from RoughTrader:

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

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
 
Back
Top