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.
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 |