sell
Open a short, or close a long when the script is long only or one-trade-at-a-time (default).
sell
Inside a when body. long only turns sell into an exit. The default one-trade-at-a-time mode (unless re-entry) does the same — sell closes the long instead of reversing. short only uses sell as the entry.
Return value
signal -1
Example
short only when ema(9) crosses below ema(21) sell