Home/Dovee/Function reference

exit

Flatten the position. close is the same word.

Reference/Language/Language

exit

Closes an open long or short from this script. Does not place a new order on the other side. If stop or target already flattened the trade, this rule (and its arrow/label) does not fire.

Return value

signal 0

Note

  • The word close in an action position is an alias for exit, not the price series.
  • No-op when already flat — including after TP Hit / SL Hit.

Example

when rsi(14) is above 70
  exit
  arrow down "Exit"

See also