tv_open_chart_url
Opens any TradingView chart URL or layout id in the chart tab, waits until ready, then reports layout owner and read-only status. Blocks navigation when unsaved changes exist unless discard_changes=true.
Instructions
Open a TradingView chart URL (or bare layout id) in the bound chart tab - own layouts and other users' shared / View Only charts alike. Full page reload, ~20 s; waits until the chart is ready and reports the layout it landed on, its owner and whether it is read-only. Refuses while the current layout has unsaved changes unless discard_changes=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | https://www.tradingview.com/chart/<id>/... or the bare layout id | |
| layout | No | chart layout id, target id, or 0-based index; default = the chart tab that is actually painting | |
| timeout_s | No | readiness deadline, default 45 | |
| expect_layout | No | layout id the tab is expected to show right now; the call refuses if it differs (a tab keeps its target id when the user opens another layout in it) | |
| discard_changes | No | navigate away even if the current layout has unsaved changes (default false) |