Hi,
I currently have bracket order that's placing orders with set prices as shown below.
However, I would like to use the parent order filled price for profit taker and stop loss order.
I have tried using .orderStatus.avgFillPrice but keep getting "0" as return.
How can I resolve this?
Thank you very much.,
I currently have bracket order that's placing orders with set prices as shown below.
However, I would like to use the parent order filled price for profit taker and stop loss order.
I have tried using .orderStatus.avgFillPrice but keep getting "0" as return.
How can I resolve this?
Code:
bracket = ib_val.bracketOrder("BUY", 200, current_price, current_price + 2, current_price - 1)
bracket.parent.orderType = "MKT"
for each_order in bracket:
orderTrade = ib_val.placeOrder(contract_val, each_order)
orderTrade.orderStatus.status = "Submitted"
Thank you very much.,