20. Adding the AI Strategy to TradingView
Follow these steps inside TradingView to get your AI-generated strategy onto a chart:
Open TradingView & your chart
Go to tradingview.com, log in and open the chart for any symbol (e.g. BTCUSDT).
Open the Pine Script Editor
At the bottom of the screen, click the “Pine Editor” tab.
You’ll see a default example script in there (TradingView’s template).
Create a new strategy script
In the Pine Editor:
Click the three dots (…) in the editor header.
Choose “New” → “New strategy”.
A new template strategy code will appear.
Replace the template with your AI code
Select all of the template text and delete it.
Go back to your Perpbot Pine Script AI Assistant tab.
Copy the entire strategy it generated.
Paste the strategy into the Pine Editor in TradingView.
Save the script
Click the Save icon.
Give it a clear name, e.g.
Perpbot SMA Breakout StrategyorPerpbot BTC 15m.
Add the strategy to your chart
Click “Add to Chart” at the top of the Pine Editor.
TradingView will compile the script and overlay the strategy on your current chart.
Last updated