indicator() declaration
The optional first line declares where the indicator is placed and how its Y axis behaves. It must appear before any input.* line. Without it the indicator lands in a sub-pane with a shared, auto-scaled axis.
indicator('RSI', overlay=false, scale=scale.none, min=0, max=100, ticks=5)| Argument | Meaning |
|---|---|
'Name' | First positional argument — the indicator name shown in the legend. Also accepted as title=. |
overlay=true | false | true draws on the main price pane; false creates a sub-pane. Default false. |
scale=scale.shared | Default. Shares the Y axis with the pane it sits on. |
scale=scale.none | No axis scaling of its own — pair with min / max for a fixed range such as an oscillator. |
scale=scale.independent | Own independent axis, auto-scaled separately from the rest of the pane. |
min= / max= | Fixed axis range. Both must be given together and max must exceed min, otherwise compilation fails. |
ticks=N | Number of gridline divisions on the axis. Must be 2 or more. Default 5. |