tv_set_symbol
Change the active TradingView chart symbol to a specified full symbol (e.g. BYBIT:BTCUSDT.P). Returns previous and current for revert; verify symbol_resolved after setting.
Instructions
MUTATES the chart: change the active chart symbol (e.g. "BYBIT:ETHUSDT.P"). Returns { previous, current } so the change can be reverted. TradingView does not validate the symbol up front - check symbol_resolved in the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layout | No | chart layout id, target id, or 0-based index; default = the chart tab that is actually painting | |
| symbol | Yes | full TradingView symbol, e.g. BYBIT:BTCUSDT.P | |
| 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) |