How can I convert scripts to a newer Pine version?
The detailed instructions on converting Pine scripts from one version to another, along with a list of important changes, can be found in our User Manual.
Additionally, the Pine Editor includes a utility to automatically convert v3 scripts to v4 and v4 scripts to v5. To access it, open your saved v3/v4 script in the Pine editor, open the dropdown menu by clicking on the `...` button and press “Convert to v4/v5”.
If the conversion is successful, you’ll get the converted code in the editor. Otherwise, you will see errors in the console under the editor explaining the reasons for the failure.
You might see warnings from the converter in the console, even if the conversion is successful. They can be caused by some differences between versions' syntax. We recommend paying close attention to conversion warnings.