Enums
## Enums
`enum Name` at the top level, then one indented line per member: `member` or `member = "Title"` (the title is
shown in settings and by `str.tostring`; without one the member name is used). Members are constants:
`Side.long`. Compare with `==` / `!=` and use them in `switch`; no arithmetic or ordering. Enums work as
variable, field, parameter and array element types (`Side s = na`, `array<Side>`, `method m(Side s)`).
`input.enum(Side.long, "Side")` shows a dropdown of the titles (`options=[Side.long, Side.short]` offers only
those) and returns the chosen member.
```lynt
indicator("Trend filter", overlay=true)
enum Mode
fast = "Fast (EMA 9)"
slow = "Slow (EMA 50)"
off = "Off"
mode = input.enum(Mode.fast, "Filter")
ma = switch mode
Mode.fast => ta.ema(close, 9)
Mode.slow => ta.ema(close, 50)
=> na
plot(ma, "Filter", color=color.amber)
if barstate.islast
label.new(bar_index, close, str.tostring(mode))
```