drawing_add
Draw on the chart. Points are {time, price} in chart coordinates — time in seconds, matching the candle timestamps a data handle reports. A horizontal line needs one point; a trendline or box needs two. Both numbers must be copied from a tool result — a summary's max with its maxAt, a crossing with its time — never read off your own prose or carried over from a different computation. The result echoes back what was drawn: check it against the figures you are about to quote, because a line that disagrees with the paragraph beside it is worse than no line. Changes the chart you are building; call chart_link when you are done so the person can open it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | A handle from market_candles. Given one, the points are checked against the window it covers and a drawing that would land outside it is refused. Pass it whenever the coordinates came from a computation. | |
| fill | No | Palette fill colour, or “none”. | |
| text | No | Text for annotation tools. | |
| tool | Yes | A tool id from catalog_search with kind "drawing" — e.g. horizontalLine, trendLine, rectangle, fibRetracement, longPosition or shortPosition. Prefer position_draw_on_chart for an entry/stop/target box. Separators and capitalisation are forgiven; an id that names no tool is refused. | |
| color | No | A palette name. “up” and “down” are the reserved green and red — they assert a bullish or bearish claim, so use them for position zones and not for a measurement. | |
| width | No | Stroke width in pixels, 1 to 6. | |
| levels | No | Custom Fibonacci ratios. Example: [0, 0.382, 0.5, 0.618, 0.786, 1, 1.272, 1.618]. | |
| points | Yes | ||
| symbol | No | Defaults to the charted symbol. | |
| opacity | No | Strength of the whole drawing, 0.1 to 1. Fade a level that is context rather than the decision. | |
| arrowEnd | No | ||
| fontSize | No | Label/text size from 8 to 28. | |
| lineStyle | No | ||
| showStats | No | ||
| arrowStart | No | ||
| extendLeft | No | ||
| showLabels | No | ||
| extendRight | No | ||
| fillOpacity | No | Shape fill opacity from 0 to 1. |