← Back to TP1

DocsIndicator Lab

Starting from your own Pine

Import a Pine v5 or v6 script you already have and keep working on it privately.

Already have a Pine script? Import it, then use the Assistant to change it like any other build. Imports stay private.

Three ways in

  • Start from Pine on the launch deck.
  • Paste Pine Script under the Assistant's message box.
  • Paste a whole script, with its //@version line and an indicator() declaration, into either message box. The importer opens with it filled in.

Importing

  1. Paste the source, or press Choose .pine file.
  2. Name (optional): leave it blank to use the script's own title.
  3. What would you like to change? (optional): your first request, if you have one.
  4. Press Import privately. Once it's stored you'll see “Saved privately. Open in chat to preview it and send your change request.”
  5. Press Open in chat. A fresh conversation opens with the script on the chart and your change request in the message box, ready to send. Your other saved indicators stay in your library.

What it accepts

  • Pine v5 or v6. For v5, only the version line is changed to v6, and the importer says so: “Saved privately. Only the v5 header was converted to v6; behavior still needs review.” Check it on the chart before you rely on it.
  • One script, pasted or as a .pine file, up to 500 KB.
  • Exactly one indicator() declaration.
  • Code the Lab can read as it stands. A script that needs rewriting first is turned away.

Private stays private

An imported script, and every version you build from it, can't be published to the community: “Imported Pine and its derived artifact stay private and cannot be published.” You can still export it and backtest it. If it's very close to a protected indicator, it's saved as Protected; see Own code and protected builds.

The Lab also keeps a copy of your original text. Right after an import, Delete retained original in the same box removes that copy for good; the imported indicator stays.

If the import fails

MessageWhat to do
“Choose a .pine file.”Pick a file that ends in .pine, or paste the code instead.
“This file is too large. Choose a Pine script up to 500 KB.”Trim the script, or import one script at a time.
“Paste a non-empty Pine script up to 500 KB.”The source box is empty or over the limit.
“Your indicator library is temporarily unavailable.”You also see this when the script itself can't be accepted. Check it's v5 or v6, has one indicator() declaration and is complete. If it is, try again in a minute.
“Finish or cancel the current build before opening another script.”Let the running build finish, or press Stop, then press Open in chat again.