strategy.close
Closes the contracts held from entry id (all, qty, or qty_percent of them) with a market order at the next bar open.
strategy.close(id: string, comment: string = na, qty: float = na, qty_percent: float = na)
Parameters
idstring: the order name; trades and the chart show itcommentstring: Text kept with the order; the trade it closes keeps the closing order's comment (default none).qtyfloat: Contracts to close (default: all held from that entry).qty_percentfloat: Percent of the contracts held to close, when qty is not given.
Example
if ta.crossunder(fast, slow)
strategy.close("Long")