开云体育

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

Re: Inconsistent behaviour of WHATIF orders


 

The code I use, with dummy parameters:

IContractOrd is IBApi.Contract
...
IOrderLabo is IBApi.Order
stOrderState is STOpenOrderWhatIf
IOrderLabo.totalQuantity=3
IOrderLabo.lmtPrice=10.50
IOrderLabo.action="SELL"
IOrderLabo.orderType="LMT"
IOrderLabo.tif="GTC"
IOrderLabo.account=accountNo
IOrderLabo.transmit=Vrai??? //mandatory for WhatIf order
IOrderLabo.WhatIf=Vrai
IBClient.ClientSocket.placeOrder(NextOrderId,IContractOrd,IOrderLabo)

Join twsapi@groups.io to automatically receive all group messages.