How can I convert scripts to a newer Pine version?

Scripts written in every Pine Script® version starting from v3 can be converted to the next version automatically using the converter available in the “Manage Scripts” menu:


In some cases, the code cannot be converted fully and requires manual changes. To learn how to manually fix these version-specific changes if necessary, consult the Migration Guides overview page in our User Manual.