tv_delete_layout
Delete a saved TradingView layout by ID or exact name. Irreversible; requires confirm=true, protects specified layouts, and refuses the active layout unless forced.
Instructions
Delete ONE saved layout from the TradingView account by layout id, numeric id or exact name. Irreversible: requires confirm=true, refuses anything listed in protect (ids or names), and refuses the layout currently shown in the bound tab unless force=true. Verifies by re-listing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | also allow deleting the layout the bound tab is showing (default false) | |
| layout | No | chart layout id, target id, or 0-based index; default = the chart tab that is actually painting | |
| confirm | No | must be true - deletion is irreversible | |
| protect | No | layout ids / numeric ids / exact names that must never be deleted by this call (e.g. the month-one roster) | |
| layout_id | Yes | layout url id (e.g. Ln7Qw3Rt), numeric id, or exact name | |
| timeout_s | No | verification deadline, default 15 | |
| 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) |