Tool
Enum
constant.enum
Inputs
No typed inputs.
Outputs
An enum line carrying the same fixed choice on every bar.
Enum emits one fixed choice from a list of named options, the same on every bar. It’s how you hard-wire a categorical setting — like a direction or a side — into the pipeline.
How it works
You declare the set of allowed options in the choices setting and pick one with the value setting; the node then outputs that single choice on every bar. There are no inputs, and the value never changes at runtime — it’s a literal.
Configuration
The single option to emit, chosen from the list you defined in choices. Every bar receives this same selection.
The full set of named options this constant may emit, defined as a list. The value setting must be one of these entries.
Connects to
No direct tool-to-tool connections.
Examples
- Define choices as long, short and set value to long to hard-wire the trade side a downstream tool reads.
- Pin a fixed category — such as a price source or a side label — so a configurable tool always sees the same option.
Common mistakes
- Setting value to a string that isn’t in choices, leaving the constant with no valid selection.
- Using constant.enum for something that should vary with the market — it always emits the one literal you picked.