Overview

Run on TradingView

Add your AI‑generated Pine Script to a TradingView chart in minutes

Follow these steps to take code from HorizonAI and run it directly in TradingView’s Pine Editor.

1) Copy your code from HorizonAI

  • In the app, finish your edits and click the Copy button at the top‑right.
  • Your Pine Script is now on your clipboard.

2) Open a TradingView chart

  • Go to the TradingView website and open any chart you want to test on.

3) Open the Pine Editor

  • At the bottom of the TradingView page, click Pine Editor to open the editor panel.

4) Replace the editor contents

  • Select all existing code in the Pine Editor and delete it.
  • Paste the code you copied from HorizonAI into the editor.

5) Add to chart

  • Click Add to chart.
  • TradingView compiles the script and adds it to your chart.

That's it. If you want changes, return to HorizonAI, tweak your prompt, copy again, and repeat the steps above.

Next Steps

Once your strategy is running on TradingView:

Troubleshooting

Getting compile errors?

  • Check out Common Pine Script Warnings for solutions
  • Return to HorizonAI and ask: "fix the compile error" or describe what's not working

Want to improve your prompts?

  • Read How to Prompt for tips on getting better results from HorizonAI

Learn Pine Script

Want to understand the code you're running?

Related Guides