series - Pine Script Type
series
Section titled “series”Overview
Section titled “Overview”The series keyword explicitly assigns the “series” type qualifier to variables and function parameters. Variables and parameters that use the “series” qualifier can reference values that change throughout a script’s execution.
Remarks
Section titled “Remarks”- To learn more, see our User Manual’s section on type qualifiers.
Example
Section titled “Example”//@version=6indicator("series variable not allowed")//@variable A variable declared as "series int" with a value of 5.series int myVar = 5// This call causes an error.// The `histbase` accepts "input int/float". It can't accept the stronger "series int" qualified type.plot(close, style = plot.style_histogram, histbase = myVar)