Thank you very much both.
With trial and error, I found that Transmit=False is of no use in this case, as I need the orders transmitted; the child order got blocked in the current format as not on the same contract.
I did not manage to use?hedgeType='P', hedgeParams=f'ratio = {self.ratio}', it seems like whatever I put in hedgeParam(s?) I get an "invalid ratio" error in return.
How would I place these conditional orders manually, that's an excellent question and I honestly don't know.
Algos seem interesting and I would love to do some profiling with them at a later stage, but these are not available for testing on paper money as I understand, so no use at this time for me.
Execution Conditions seem to offer every possible condition, except the condition of another order getting executed, or maybe I am missing something.
Combo orders might be closest to what I am looking for, but I spent a few hours on it thus far without understanding the concept..
Apparently I need to define a "BAG" contract like "AAPL, AMZN", put an action "BUY"/"SELL" and a ratio on each leg, and then append both legs to a?contract.comboLegs object.
What is not clear at all from?
is what to do next with this contract.comboLegs object?
According to??I need to define an order with the orderComboLegs properties in there,
but it suggests that this order must also have an action, and orderType e.g. "LMT", a quantity and/or a limit price? what does that mean? the quantity of what? the limit price of what exactly?
Also how does the guaranteed flag work? if I need both legs or nothing, I should simply not mention it?