If MP >= value & Date/Time < Target then Sell Option - Profit Target
If MP < value & Date/Time < Target then Sell Option - Stop Loss
If Date/Time >= Target Sell Option at Mkt
Is it possible to put this logic in a single OCO, If Yes, How?
If this is the wrong forum, apologies -- what would be the best one?
Thank you for the hard work?
Mike
Thinkorswim specifically, its ordinary OCO template is not a dependable way to package all three exits into one unattended order. The profit target and stop can be OCO, but the time-based market liquidation generally needs a separate conditional order or manual/automated handling. Also, an option market order can fill badly when the spread is wide; a marketable limit order is usually safer.
Just a note -
There is an important flaw in the conditions as written:
If MP >= value before Target → Sell
If MP < value before Target → Sell
Those two conditions cover every possible market price, so one sell condition will be true immediately. You need two different values:
If option MP >= ProfitTarget before Deadline:
Sell option at limit/market
Else if option MP <= StopLoss before Deadline:
Sell option at stop/market
Else if Date/Time >= Deadline:
Sell option at market
For example:
Profit target: MP >= $5.00
Stop loss: MP <= $2.00
Time exit: Friday at 2:30 PM
The practical order structure is:
OCA Group
├── SELL LIMIT at $5.00
├── SELL STOP at $2.00
└── Timed SELL MARKET at Friday 2:30 PM
A conventional OCO contains only the profit target and stop loss. The timed exit requires either:
- A broker-supported third order in the same cancellation group, or
- Automation that cancels the OCO and submits a market order at the deadline.