Is it possible to cancel more than one with an OCO order?
Ie. say I have 3 buy Call orders and if one of them gets filled then immediately the other 2 orders shall be cancelled.
Can this be done with an OCO ? Or any other conditional order? Of course timing is important the faster the better.
Can the following TDA API example be modified for the above requirement? :
Conditional Order: One Triggers A One Cancels Another
Buy 5 shares of XYZ at a Limit price of $14.97 good for the Day. Once filled, 2 sell orders are immediately sent: Sell 5 shares of XYZ at a Limit price of $15.27 and Sell 5 shares of XYZ with a Stop order where the stop price is $11.27. When one of the sell order fills, the other order is immediately cancelled. Both Sell orders are Good till Cancel. Also known as a 1stTrigger OCO order.
Ie. say I have 3 buy Call orders and if one of them gets filled then immediately the other 2 orders shall be cancelled.
Can this be done with an OCO ? Or any other conditional order? Of course timing is important the faster the better.
Can the following TDA API example be modified for the above requirement? :
Conditional Order: One Triggers A One Cancels Another
Buy 5 shares of XYZ at a Limit price of $14.97 good for the Day. Once filled, 2 sell orders are immediately sent: Sell 5 shares of XYZ at a Limit price of $15.27 and Sell 5 shares of XYZ with a Stop order where the stop price is $11.27. When one of the sell order fills, the other order is immediately cancelled. Both Sell orders are Good till Cancel. Also known as a 1stTrigger OCO order.
Code:
{
"orderStrategyType": "TRIGGER",
"session": "NORMAL",
"duration": "DAY",
"orderType": "LIMIT",
"price": 14.97,
"orderLegCollection": [
{
"instruction": "BUY",
"quantity": 5,
"instrument": {
"assetType": "EQUITY",
"symbol": "XYZ"
}
}
],
"childOrderStrategies": [
{
"orderStrategyType": "OCO",
"childOrderStrategies": [
{
"orderStrategyType": "SINGLE",
"session": "NORMAL",
"duration": "GOOD_TILL_CANCEL",
"orderType": "LIMIT",
"price": 15.27,
"orderLegCollection": [
{
"instruction": "SELL",
"quantity": 5,
"instrument": {
"assetType": "EQUITY",
"symbol": "XYZ"
}
}
]
},
{
"orderStrategyType": "SINGLE",
"session": "NORMAL",
"duration": "GOOD_TILL_CANCEL",
"orderType": "STOP",
"stopPrice": 11.27,
"orderLegCollection": [
{
"instruction": "SELL",
"quantity": 5,
"instrument": {
"assetType": "EQUITY",
"symbol": "XYZ"
}
}
]
}
]
}
]
}
Last edited: