?This is what I thought too. I have updated my code, let’s see on Monday.
When I attach the stop loss order, I enter transmit=False to all orders, except the last attachment. I realised earlier today that on the log "Transmit=False”, which how I entered it.
Now I can only wait to Monday.
Thanks for your inputs.
toggle quoted message
Show quoted text
On 13 Jul 2024, at 19:10, Jason via groups.io <muffles.amatory.0a@...> wrote:
The only other thing I can think of is that the STP isn’t getting transmitted (transmit=False) but I believe the default is transmit=True, however I don’t know offhand how a non-transmitted order’s order status presents.
On Sat, Jul 13, 2024 at 11:21 AM, Gonzalo Saenz via?<yo=gnzsnz.com_at_groups_io_k21bj418pxe6c8_756s0895@...> wrote:Yes, STP has it’s parentId=MOO.orderId
Do you think this might be to problem?
On 12 Jul 2024, at 20:47, Jason via groups.io <muffles.amatory.0a@...> wrote:
Are you linking the STP order to the MOO via parentId?
On Fri, Jul 12, 2024 at 12:24 PM, Gonzalo Saenz via groups.io <
yo=gnzsnz.com_at_groups_io_k21bj418pxe6c8_756s0895@...> wrote:
Hi,
I’m running an algo that triggers Market-on-Open orders. As it’s a MOO order the price is not known (although my logic will use a ticker to decide to trigger or not) at the time the order is created.
As I want to have a stop loss, I have added a commissionReportEvent handler. When orders are filled, I wait for the order to be fully filled, “trade.order.totalQuantity == fill.execution.cumQty” and I update the stop loss attached to the MOO order, with a stop loss price in line with the avg fill price.
This is working all fine. The problem that I have is that the updated order is never actually in status “submitted”. As per the orders notebook https://nbviewer.org/github/ib-api-reloaded/ib_async/blob/main/notebooks/ordering.ipynb, I update the order, execute placeOrder(contract,updated_order), status is ‘PendingSubmit’ then —> ‘PreSubmitted’ but it never reaches “Submited”
There is no error message, nothing on the log not TWS. I used to have some problems due to incorrect values on the order, but those were showing an actual error message. Now there is nothing.
Any pointer to the right direction will be appreciated.
Cheers