Drawings
Read, create, copy, update and delete drawings on the chart.
04d191a). Descriptions are the exact text the model receives.drawings_list
List every drawing on the current symbol. Returns timezone, period and drawings. Each drawing exposes id, kind, row, anchors, style, labels, visible, locked, zIndex, timeframeVisibility and visibleInCurrentPeriod. row is the display row and identifies the pane; id is assigned by the chart. anchor time is RFC 3339 with an offset in the chart timezone and can be written back unchanged.
Parameters
This tool takes no input.
JSON Schema
…drawings_write
Create, update or delete chart drawings. create: row from drawings_list, kind, anchors and style; row is the display row, where 0 is the top and the main chart can be any row. update: drawingId plus any of style, labels, visible, locked, zIndex, timeframeVisibility; geometry changes by delete then create. delete: drawingId. Anchor shapes by kind: trend-line, ray, extended-line, fib-retracement, rectangle, arrow, info-line, regression-channel: 2 anchors with time and price; horizontal-line: 1 anchor with price only; horizontal-ray, cross-line: 1 anchor with time and price; vertical-line: 1 anchor with time only; parallel-channel, flat-line, disjoint-channel: 3 anchors with time and price. Label targets by kind: trend-line (line); ray (line); extended-line (line); fib-retracement (level:0, level:0.236, level:0.382, level:0.5, level:0.618, level:0.786, level:1); rectangle (top, right, bottom, left, inside); arrow (line); horizontal-line (line); horizontal-ray (line); vertical-line (line); cross-line (horizontal, vertical); info-line (line); parallel-channel (base, opposite, median, inside); regression-channel (median, upper, lower, inside); flat-line (base, opposite, inside); disjoint-channel (base, opposite, inside). Fibonacci targets use the configured ratio, for example level:0.5 is the 50% line. Times are RFC 3339 with an offset in the chart timezone, exactly as drawings_list returns them.
Parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
action | enum | Yes | one of "create", "update", "delete" | |
row | integer | — | ≥ 0 | create only: display row from drawings_list, where 0 is the top row. The main chart can be at any row. |
kind | enum | — | one of "trend-line", "ray", "extended-line", "fib-retracement", "rectangle", "arrow", "horizontal-line", "horizontal-ray", "vertical-line", "cross-line", "info-line", "parallel-channel", "regression-channel", "flat-line", "disjoint-channel" | |
anchors | object[] | — | min items 1; max items 3 | create only: the defining points, exactly as many as the kind declares. Each point carries the axes that kind uses. |
anchors[].time | string | — | pattern ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2})?(Z|[+-]\d{2}:\d{2}))?$ | RFC 3339 with an offset in the chart timezone, exactly as drawings_list returns it. Daily and higher periods also accept a bare date. |
anchors[].price | number | — | — | Price coordinate of this anchor. |
style | object | — | — | |
style.stroke | enum | — | one of "#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF" | |
style.strokeWidth | number | — | > 0 | |
style.strokeStyle | enum | — | one of "solid", "dashed", "dotted" | |
style.fill | enum | — | one of "#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF" | |
style.fillOpacity | number | — | ≥ 0; ≤ 1 | |
style.pointRadius | number | — | > 0 | |
style.textColor | enum | — | one of "#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF" | |
style.fontSize | number | — | > 0 | |
labels | record | — | closed | Labels keyed by drawing target. Each target takes one text and position. On update, omitted targets keep their labels and null removes a label. |
visible | boolean | — | — | |
locked | boolean | — | — | |
zIndex | number | — | — | 同一行内的绘制层级,越大越靠上。 |
timeframeVisibility | object | — | closed | |
timeframeVisibility.mode | enum | — | one of "all", "above", "below", "current" | |
timeframeVisibility.period | string | — | min length 1 | Reference period; required unless mode is "all", for example "daily". |
drawingId | string | — | min length 1 | update and delete: id returned by drawings_list. |
Minimal input · Required fields only; placeholders are derived from the schema.
{
"action": "create"
}JSON Schema
…