Constants
strategy.oca_cancel
A one-cancels-all type, for the `oca_type` argument of `strategy.entry` and `strategy.order`. When one order of the group fills, the other orders of the same group are cancelled.
Example
//@lipi=2
strategy("strategy.oca_cancel Example", overlay=true, initial_capital=10000)
// Two breakout entries in one group: the first to fill decides
if strategy.position_size == 0 {
strategy.entry("Up", strategy.long, stop=high + syminfo.mintick, oca_name="Breakout", oca_type=strategy.oca_cancel)
strategy.entry("Down", strategy.short, stop=low - syminfo.mintick, oca_name="Breakout", oca_type=strategy.oca_cancel)
}
Type
const string