Notice!This is documentation for v4, which is no longer actively maintained.
For up-to-date documentation, see the latest version.
 -->

Versions

There are currently four versions of the Pine Script Language. A
compiler directive must be used in the first line of a script to specify
the version or Pine used by the script: //@version=N where N is the
version number (1-4). Note that different Pine Script Language
versions are incompatible with each other.

Notable changes to the language are documented in
Release notes.