March 20, 2017
Introducing PineScript Version 3

A new version 3 of PineScript is here! Some exciting features in this new version include:

  • We’ve fixed the way security function behaves while working with the historical data. Find out more on our wiki.
  • An implicit conversion of boolean values to numeric values was replaced with an implicit conversion of numeric values (integer and float) to boolean values.
  • Self-referenced and forward-referenced variables were removed. Any PineScript code that used those language constructions can be equivalently rewritten using mutable variables.

In order to use PineScript v.3, input a specific directive in the first line:


Detailed instructions on migrating to version 3 can be found here.

PineScript is a language that we compile in our cloud. Compilers for v2 are still available, so all existing script will continue to work. However, we’ve scaled back support for v2 and lower, only critical updates will be issued. New features will only be added to v3 going forward. Enjoy!

The fastest way to follow markets

Launch Chart