dwlf_create_annotation
Create custom chart annotations on DWLF price charts—such as levels, trendlines, zones, callouts, and position markers—by specifying symbol, timeframe, type, and shape data.
Instructions
Create a chart annotation. type selects the shape; data carries the type-specific fields documented below. Note arrow is the callout/bubble-with-pointer and text is a plain text box — for commentary that points at a level, use arrow.
DATA SHAPES BY TYPE (times = unix-ms, prices = chart price):
• hline — {price, color, lineStyle, lineWidth, showPrice, label?}: horizontal price level.
• vline — {time, color, lineStyle, lineWidth, showTime, label?}: vertical time marker.
• text — {time, price, text, fontSize, color, backgroundColor?}: free text box anchored at a point. Use \n inside text for multi-line — long single-line text renders too wide to read, so break it up.
• arrow — {time1, price1, time2, price2, text, fontSize, color, lineStyle, lineWidth}: callout/speech-bubble. The text box sits at (time1,price1); the arrowhead points to (time2,price2). Use this to label a level or zone with a pointer.
• trendline — {time1, price1, time2, price2, color, lineStyle, lineWidth, label?, extendLeft?, extendRight?}: line through two points.
• ray — {time1, price1, time2, price2, color, lineStyle, lineWidth, label?}: half-line from point 1 through point 2.
• rectangle — {time1, price1, time2, price2, color, fillOpacity, lineStyle, lineWidth, label?}: shaded zone between two opposite corners.
• channel — {time1, price1, time2, price2, priceOffset, color, lineStyle, lineWidth, fillOpacity, label?, extendLeft?, extendRight?}: parallel channel; the second rail runs priceOffset above (+) / below (−) the base line.
• crossline — {time, price, color, lineStyle, lineWidth, showPrice, showTime, label?}: crosshair marker at one point.
• emoji — {time, price, emoji, size}: emoji marker (e.g. emoji "🦊").
• timerange — {time1, time2, color, fillOpacity, lineStyle, lineWidth, label?}: vertical time band.
• fibRetracement / measure — {time1, price1, time2, price2, levels:number[], showExtensions, extendRight, color, lineStyle, lineWidth, fillOpacity, label?}: fib/measure between two swing points.
• fib_extension — {time1, price1, time2, price2, color, lineStyle, lineWidth, label?}: extension projection.
• alert_line — {price, color, lineStyle, lineWidth, showPrice, direction:"above"|"below", label?}: a DRAWING of a price-alert line. Creating one here does NOT arm a price alert: nothing will fire, and the web chart shows it as "Alert not armed" until the user arms it there. Deleting an armed line disarms its alert.
• long_position / short_position — {time1, time2, entryPrice, stopPrice, targetPrice, label?}: renders an entry line, stop+target zones and a live R:R badge.
ALIASES (same storage — prefer the first of each pair): text over note; emoji over icon; alert_line over price_alert; fibRetracement over fib_retracement.
TIP: copy an existing shape via dwlf_list_annotations if unsure.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>",
"timeframe": "<timeframe>",
"type": "<type>",
"data": "<data>"
},
"name": "dwlf_create_annotation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Type-specific fields. See DATA SHAPES BY TYPE in the tool description. Max 4KB serialized. | |
| type | Yes | Annotation type — see the data-shape reference in the tool description for the fields each one needs. | |
| origin | No | Who created it: "user" (default), "ai" (agent-generated — use this for your own annotations), or "system". | |
| symbol | Yes | Trading symbol (e.g. BTC, TSLA) | |
| timeframe | Yes | Timeframe (e.g. "daily", "weekly", "hourly") |