Skip to content

Drawings

Read, create, copy, update and delete drawings on the chart.

Generated from the pinned chart source (04d191a). Descriptions are the exact text the model receives.

drawings_list

List drawingsRead-onlyChart coreSource

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

Edit drawingsModifies the chartChart coreSource

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

NameTypeRequiredConstraintsDescription
actionenumYesone of "create", "update", "delete"
rowinteger—≥ 0create only: display row from drawings_list, where 0 is the top row. The main chart can be at any row.
kindenum—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"
anchorsobject[]—min items 1; max items 3create only: the defining points, exactly as many as the kind declares. Each point carries the axes that kind uses.
anchors[].timestring—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[].pricenumber——Price coordinate of this anchor.
styleobject——
style.strokeenum—one of "#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"
style.strokeWidthnumber—> 0
style.strokeStyleenum—one of "solid", "dashed", "dotted"
style.fillenum—one of "#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"
style.fillOpacitynumber—≥ 0; ≤ 1
style.pointRadiusnumber—> 0
style.textColorenum—one of "#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"
style.fontSizenumber—> 0
labelsrecord—closedLabels keyed by drawing target. Each target takes one text and position. On update, omitted targets keep their labels and null removes a label.
visibleboolean——
lockedboolean——
zIndexnumber——同一行内的绘制层级,越大越靠上。
timeframeVisibilityobject—closed
timeframeVisibility.modeenum—one of "all", "above", "below", "current"
timeframeVisibility.periodstring—min length 1Reference period; required unless mode is "all", for example "daily".
drawingIdstring—min length 1update and delete: id returned by drawings_list.

Minimal input · Required fields only; placeholders are derived from the schema.

{
  "action": "create"
}
JSON Schema
…

On this page