Rebuild From Screenshot
You are recreating a chart layout from a user-provided screenshot using vision + MCP tools.
Step 1: Receive the Screenshot
The user pastes an image. Visually read it and extract:
- Symbol — from the top-left ticker label
- Timeframe — from the resolution selector (e.g., "5", "15", "1H", "D")
- Chart type — Candles, Heikin Ashi, Line, Bars, etc.
- Indicators — every pane + overlay study (names + approximate params like "EMA(200)")
- Drawings — trend lines, rectangles, horizontal levels, text
- Visible date range — leftmost to rightmost bar dates
Step 2: Capture Live Chart State
chart_vision_read — returns combined image + readings (symbol, timeframe, indicator list, key values) in one call. Prefer this over separate capture_screenshot + chart_get_state for this workflow.
If chart_vision_read fails with CHART_LOADING, wait and retry once.
Step 3: Diff
Compare the pasted screenshot against the chart_vision_read output. Build a minimal change list:
- Symbol match? If not, queue
chart_set_symbol
- Timeframe match? If not, queue
chart_set_timeframe
- Indicator set — which to add, which to remove, which to reconfigure
- Drawings — which to add (source coords from the screenshot), which to clear
Step 4: Apply Changes
Execute in this order to minimize reflows:
chart_set_symbol (e.g., "NASDAQ:TSLA")
chart_set_timeframe (e.g., "60")
chart_set_type if needed (e.g., "HeikinAshi")
- For each missing indicator:
chart_manage_indicator with action "add" and the full name ("Moving Average Exponential", not "EMA")
indicator_set_inputs to match params (e.g., EMA length 200)
- For each drawing:
- Horizontal level →
draw_shape with horizontal_line at the price from the screenshot
- Trend line →
draw_shape with trend_line + two {time, price} points
- Text →
draw_shape with text
- If leftover studies/drawings don't belong:
chart_manage_indicator remove + draw_remove_one by id
Concrete example — rebuilding a TSLA 1H chart with EMA(20)/EMA(200) and a horizontal at 250.00:
chart_set_symbol("NASDAQ:TSLA")
chart_set_timeframe("60")
chart_manage_indicator({ action: "add", name: "Moving Average Exponential" })
indicator_set_inputs({ length: 20 })
chart_manage_indicator({ action: "add", name: "Moving Average Exponential" })
indicator_set_inputs({ length: 200 })
draw_shape({ type: "horizontal_line", point: { price: 250.00 } })
Step 5: Verify
chart_vision_read again — confirm the new live state
- Diff once more against the user's screenshot
- If mismatches remain (e.g., indicator param still off), iterate on step 4
Step 6: Report
Tell the user what was applied, what couldn't be matched exactly (e.g., proprietary indicators not recognizable by name), and show the final screenshot path.
Error Notes
CHART_LOADING — chart still rendering; wait 1-2s and retry
INDICATOR_NOT_FOUND — name in screenshot isn't a built-in (likely custom Pine); ask user to load it manually
- If colors/styles matter for the match, mention them but don't chase perfection — focus on structural fidelity
1---2name: rebuild-from-screenshot-43description: Reproduce a chart from a screenshot — read the user's pasted image, diff against the live chart, then set symbol/indicators/drawings to match. Use when the user pastes a chart image and says "recreate this" or "set up my chart like this".4---56# Rebuild From Screenshot78You are recreating a chart layout from a user-provided screenshot using vision + MCP tools.910## Step 1: Receive the Screenshot1112The user pastes an image. Visually read it and extract:1314- **Symbol** — from the top-left ticker label15- **Timeframe** — from the resolution selector (e.g., "5", "15", "1H", "D")16- **Chart type** — Candles, Heikin Ashi, Line, Bars, etc.17- **Indicators** — every pane + overlay study (names + approximate params like "EMA(200)")18- **Drawings** — trend lines, rectangles, horizontal levels, text19- **Visible date range** — leftmost to rightmost bar dates2021## Step 2: Capture Live Chart State22231. `chart_vision_read` — returns combined image + readings (symbol, timeframe, indicator list, key values) in one call. Prefer this over separate `capture_screenshot` + `chart_get_state` for this workflow.2425If `chart_vision_read` fails with `CHART_LOADING`, wait and retry once.2627## Step 3: Diff2829Compare the pasted screenshot against the `chart_vision_read` output. Build a minimal change list:3031- Symbol match? If not, queue `chart_set_symbol`32- Timeframe match? If not, queue `chart_set_timeframe`33- Indicator set — which to add, which to remove, which to reconfigure34- Drawings — which to add (source coords from the screenshot), which to clear3536## Step 4: Apply Changes3738Execute in this order to minimize reflows:39401. `chart_set_symbol` (e.g., `"NASDAQ:TSLA"`)412. `chart_set_timeframe` (e.g., `"60"`)423. `chart_set_type` if needed (e.g., `"HeikinAshi"`)434. For each missing indicator: `chart_manage_indicator` with action `"add"` and the **full name** ("Moving Average Exponential", not "EMA")445. `indicator_set_inputs` to match params (e.g., EMA length 200)456. For each drawing:46 - Horizontal level → `draw_shape` with `horizontal_line` at the price from the screenshot47 - Trend line → `draw_shape` with `trend_line` + two `{time, price}` points48 - Text → `draw_shape` with `text`497. If leftover studies/drawings don't belong: `chart_manage_indicator` remove + `draw_remove_one` by id5051Concrete example — rebuilding a TSLA 1H chart with EMA(20)/EMA(200) and a horizontal at 250.00:5253```54chart_set_symbol("NASDAQ:TSLA")55chart_set_timeframe("60")56chart_manage_indicator({ action: "add", name: "Moving Average Exponential" })57indicator_set_inputs({ length: 20 })58chart_manage_indicator({ action: "add", name: "Moving Average Exponential" })59indicator_set_inputs({ length: 200 })60draw_shape({ type: "horizontal_line", point: { price: 250.00 } })61```6263## Step 5: Verify64651. `chart_vision_read` again — confirm the new live state662. Diff once more against the user's screenshot673. If mismatches remain (e.g., indicator param still off), iterate on step 46869## Step 6: Report7071Tell the user what was applied, what couldn't be matched exactly (e.g., proprietary indicators not recognizable by name), and show the final screenshot path.7273## Error Notes7475- `CHART_LOADING` — chart still rendering; wait 1-2s and retry76- `INDICATOR_NOT_FOUND` — name in screenshot isn't a built-in (likely custom Pine); ask user to load it manually77- If colors/styles matter for the match, mention them but don't chase perfection — focus on structural fidelity