Skip to content
Algo Trade Analytics Docs
Pine library page — review pending. This page is preserved for compatibility but is not part of the reviewed search index. Check the official Pine Script v6 reference before relying on its explanation, signature, or example.

simple - Pine Script Type

The simple keyword explicitly assigns the “simple” type qualifier to variables and function parameters. Variables and parameters that use the “simple” qualifier can reference values established at the beginning of a script’s execution that do not change later.

  • To learn more, see our User Manual’s section on type qualifiers.
//@version=6indicator("can't change simple to series")//@variable A variable declared as "simple float" with a value of 5.0.simple float myVar = 5.0// This reassignment causes an error.// The `close` variable returns a "series float" value. Since `myVar` is restricted to "simple" values, it cannot// change its qualifier to "series".myVar := closeplot(myVar)