Using your indicator in TradingView
Copy or download the Pine code of your build and add it to your TradingView chart.
The code of every Own code build is yours to take to TradingView. Exporting is free and doesn't use any of your usage.
Get the code
- Open the indicator in the Lab.
- Press Finish, then Code. The code panel shows the script's name and line count.
- Press Copy code to put the whole script on your clipboard, or Download .pine to save it as a file.
If your browser blocks the clipboard, the panel selects the code for you and says “Clipboard access is unavailable. Code selected — press Ctrl+C or ⌘C to copy.” The downloaded file is named after the indicator and starts with a short comment header noting it was built in the Lab. Copy code gives you the script without that header.
Add it to TradingView
The panel's instruction is “Paste into TradingView's Pine Editor to use your indicator.” Step by step:
- Open TradingView's Pine Editor.
- Replace what's in the editor with your code, then save.
- Click Add to chart. It stays under Indicators → My scripts.
If you downloaded the file, open it in any text editor and copy everything into the Pine Editor.
When the code won't open
- “Build an indicator first”: there's nothing on the chart yet.
- “Exit replay to open the code”: close Replay, then press Code again.
- Make it yours first: the build is protected or very close to a protected indicator. See Own code and protected builds.
[TP1]