Keyboard Shortcuts
Likes
Search
Multiple Price Conditions with "OR"
Hi, Been looking around, but couldn't figure it out. So I want to buy an option but only if ONE of the conditions is true (Underlying Price "OR" Time).. Meaning if either price cosses $X "OR" if time crosses a certain time. I am able to send an order by using the default "AND".. however I want to change "AND" to "OR" and I cant figure out how to do that! I see that in the docs, they have:
However when I go into the source code, I dont see "isConjunctionConnection" anymore as part of the priceCondition Class.. Its been moved to the orderCondition Class. I am using IBAPI version 9.81.1.post1. Can anyone help me please? |
Not sure which API language you are referring to, but the isConjunctionConnection field does exist. In the Java API is is defined in the OrderCondition super class that all specialized condition classes extend. Below a small utility function from our framework that configures an OrderCondition of any type to be connected to the next condition in the list with OR. 闯ü谤驳别苍 ???public static final boolean ConjunctionAnd = true; |
Hi, First I create "price_condition" (only 1) and in that, they dont have a "isConjunctionConnection" property (even the docs say there is, docs is v9.72 and i am using 9.81.1). I am attaching the order_condition.py file that came with 9.81.1 and from that you can see the property is not there, but its there in another class.. But I am not sure how to use it.. After that, I create an order, then I am? appending the price_condition to the order and sending it.. This works well, but I want to add another price_condition with "OR" Let me know if its clear. Thanks.
|