跳到正文

画线

读取、创建、复制、修改和删除图表上的画线。

由固定提交的图表源码生成(1aa5e22)。工具说明保留模型实际收到的英文原文,不做翻译。

drawings_list

List drawings只读可并行图表内核源码

List every committed chart drawing. Anchors use timestamp and price; rendering indexes and interaction previews are not exposed.

参数

此工具不需要输入。

JSON Schema
…

drawing_create

Create drawing修改图表按序执行图表内核源码

Create a committed chart drawing using a supported kind and an existing paneId. Required anchor count by kind — 1: horizontal-line, horizontal-ray, vertical-line, cross-line; 2: trend-line, ray, extended-line, fib-retracement, rectangle, arrow, info-line, regression-channel; 3: parallel-channel, flat-line, disjoint-channel. horizontal-line anchors require only price; all other anchors require tradingDate in YYYY-MM-DD format and price. labels is the complete text model keyed by the rendered line or area index.

参数

字段类型必填约束说明
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"
paneIdstring是min length 1
anchorsobject[]是min items 1; max items 3
anchors[].tradingDatestring—pattern ^\d{4}-\d{2}-\d{2}$
anchors[].pricenumber是—
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
labelsobject—closed
labels.linerecord—closed键为渲染输出的线段或区域序号,从 "0" 起的字符串数字。
labels.line.<n>.textstring——标签文本。使用字面量 \n 作为唯一换行控制码。
labels.line.<n>.positionenum—one of "start", "center", "end"
labels.arearecord—closed键为渲染输出的线段或区域序号,从 "0" 起的字符串数字。
labels.area.<n>.textstring——标签文本。使用字面量 \n 作为唯一换行控制码。
labels.area.<n>.positionenum—one of "start", "center", "end"
visibleboolean——
lockedboolean——
zIndexnumber——

最小输入 · 仅含必填字段,占位值由 schema 推导。

{
  "kind": "trend-line",
  "paneId": "<paneId>",
  "anchors": [
    {
      "price": 0
    }
  ]
}
JSON Schema
…

drawings_copy

Copy drawings修改图表按序执行图表内核源码

Copy drawings by ID with a shared screen offset. Selects visible, unlocked copies; the entire group is one undo step.

参数

字段类型必填约束说明
drawingIdsstring[]是min items 1; item min length 1

最小输入 · 仅含必填字段,占位值由 schema 推导。

{
  "drawingIds": [
    "<drawingId>"
  ]
}
JSON Schema
…

drawing_update

Update drawing修改图表按序执行图表内核源码

Update a committed chart drawing by id. labels replaces the complete text model; obtain it from drawings_list before changing it. Supply at least one patch field. Required anchor count by kind — 1: horizontal-line, horizontal-ray, vertical-line, cross-line; 2: trend-line, ray, extended-line, fib-retracement, rectangle, arrow, info-line, regression-channel; 3: parallel-channel, flat-line, disjoint-channel. horizontal-line anchors require only price; all other anchors require tradingDate in YYYY-MM-DD format and price.

参数

字段类型必填约束说明
drawingIdstring是min length 1
patchobject是—
patch.anchorsobject[]—min items 1; max items 3
patch.anchors[].tradingDatestring—pattern ^\d{4}-\d{2}-\d{2}$
patch.anchors[].pricenumber——
patch.styleobject——
patch.style.strokeenum—one of "#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"
patch.style.strokeWidthnumber—> 0
patch.style.strokeStyleenum—one of "solid", "dashed", "dotted"
patch.style.fillenum—one of "#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"
patch.style.fillOpacitynumber—≥ 0; ≤ 1
patch.style.pointRadiusnumber—> 0
patch.style.textColorenum—one of "#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"
patch.style.fontSizenumber—> 0
patch.labelsobject—closed
patch.labels.linerecord—closed键为渲染输出的线段或区域序号,从 "0" 起的字符串数字。
patch.labels.arearecord—closed键为渲染输出的线段或区域序号,从 "0" 起的字符串数字。
patch.visibleboolean——
patch.lockedboolean——
patch.zIndexnumber——

最小输入 · 仅含必填字段,占位值由 schema 推导。

{
  "drawingId": "<drawingId>",
  "patch": {}
}
JSON Schema
…

drawing_delete

Delete drawing修改图表按序执行图表内核源码

Delete one committed chart drawing by id. Returns whether a drawing was removed.

参数

字段类型必填约束说明
drawingIdstring是min length 1

最小输入 · 仅含必填字段,占位值由 schema 推导。

{
  "drawingId": "<drawingId>"
}
JSON Schema
…

drawings_clear

Clear drawings修改图表按序执行图表内核源码

Delete every committed chart drawing. Interaction previews are not persisted and are unaffected.

参数

此工具不需要输入。

JSON Schema
…

本页内容