How to create new script

When you open the Pine Editor, it will automatically load the last script you opened.

If you want to create a new script:

  1. Click the “Open” button at the top right of the Editor.
  2. Select one of the “Templates” options from the dropdown tab:
    • “New indicator”
    • “New strategy”
    • “New library”

After making your desired changes to the code, save the script in your personal repository. The next time you open the Editor, it will load that script by default.

If you open a Built-in script, don't worry. Any changes you make to the code are local to your account and do not affect the original script in any way.

When you open other users' scripts in your Pine Editor, the situation is similar, except that before you can make changes, you must make a copy of the script first. Any edits you make to this copy will not affect the original script in any way.