开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Help! Cancel order


 

开云体育

?I have been struggling with this for 2 days, does anyone have VB code for canceling a pending order. I 've tried 6
ways from Sunday to make it work and I am totally lost.
?
Thanks,
?
Bruce


 

Either: store in your application's globals the ID number of the
orders you are sending, and their status, or extract them from TWS
(Tws1.reqOpenOrders). Once you know the ID, then use:
Tws1.cancelOrder (orderId). It's all in the Excel spreadsheet VBA
Macros, and user's manual.
I hope this helps.

MK


--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
I have been struggling with this for 2 days, does anyone have VB
code for canceling a pending order. I 've tried 6
ways from Sunday to make it work and I am totally lost.

Thanks,

Bruce