add_pine_to_chart
Add your saved Pine script to a TradingView chart as a study to display the latest indicator. Existing studies remain untouched; for strategies, use run_backtest.
Instructions
Add one of the user's OWN saved Pine scripts (latest version) to a TradingView chart as a study — e.g. to show an improved indicator after save_pine_script. Additive only: never removes or replaces existing studies (the user can remove it from the chart UI). For strategies prefer run_backtest, which cleans up after itself.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pine_id": "<pine_id>"
},
"name": "add_pine_to_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pine_id | Yes | Script id from list_pine_scripts | |
| chart_index | No | Chart index in a multi-chart layout. Default: the active chart |