strategy.order

A plain order: buys or sells qty contracts with no reversal and no pyramiding limit. With limit or stop it waits at that price; the same id replaces a waiting order. oca_name and oca_type as in strategy.entry.

strategy.order(id: string, direction: string, qty: float = na, limit: float = na, stop: float = na, comment: string = na, oca_name: string = na, oca_type: string = na)

Parameters

Example

if ta.crossunder(close, ta.sma(close, 20))
    strategy.order("Sell 1", strategy.short, 1)