@iccandle/vuejs-widget 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,33 @@
1
1
  # @iccandle/vuejs-widget
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@iccandle/vuejs-widget.svg)](https://www.npmjs.com/package/@iccandle/vuejs-widget)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@iccandle/vuejs-widget.svg)](https://www.npmjs.com/package/@iccandle/vuejs-widget)
5
+ [![license](https://img.shields.io/npm/l/@iccandle/vuejs-widget.svg)](#license)
6
+ ![vue](https://img.shields.io/badge/vue-%5E3.5-42b883)
7
+
3
8
  Vue 3 scanner overlay for an existing [TradingView Charting Library](https://www.tradingview.com/charting-library-docs/) widget. It adds ICCandle’s draggable scanner popup, pattern search, replay of predicted candles, and a results embed.
4
9
 
5
- Published as ESM and CommonJS. Component styles are bundled and injected at runtime — no separate CSS import.
10
+ Published as ESM and CommonJS with TypeScript declarations. Component styles are bundled and injected at runtime — no separate CSS import.
11
+
12
+ ## Features
13
+
14
+ - **Pattern scanner** — select a range on the chart and search for similar historical patterns across forex, commodities, indices, crypto, and stocks.
15
+ - **AI simulation replay** — predicted candles are revealed bar by bar on your chart, skipping closed sessions (e.g. the FX weekend) so 2H/4H bars stay on the chart grid.
16
+ - **Correlated markets panel** — while a simulation is on the chart, the popup expands to show how the move is expected to ripple into correlated markets (ρ, direction, % move).
17
+ - **Pattern Tracker** — subscribe to alerts when a selected pattern forms again.
18
+ - **News / event overlays** — event marks, vertical lines, and event-anchored simulations.
19
+ - **Theming** — light, dark, or system, plus CSS custom properties and custom backgrounds.
20
+ - **8 UI languages** — `en`, `zh`, `vi`, `th`, `ko`, `ja`, `mn`, `ru`.
21
+
22
+ ## Contents
23
+
24
+ - [Install](#install)
25
+ - [Prerequisites](#prerequisites)
26
+ - [Quick start](#quick-start)
27
+ - [Usage](#usage)
28
+ - [API](#api)
29
+ - [Troubleshooting](#troubleshooting)
30
+ - [Changelog](#changelog)
6
31
 
7
32
  ## Install
8
33
 
@@ -237,6 +262,16 @@ Only the entry for the active theme is used, and each key is optional — omit o
237
262
 
238
263
  `language` accepts `"en"` | `"zh"` | `"vi"` | `"th"` | `"ko"` | `"ja"` | `"mn"` | `"ru"`. Unknown values fall back to `"en"`. The value is used for scanner copy and is forwarded into embed URLs.
239
264
 
265
+ ### Correlated markets panel
266
+
267
+ When the embed sends a `chart.play` message whose `data.correlation` holds a correlation payload (`root` symbol plus `simulations[0].symbols`), the scanner popup expands under its toolbar once the simulated candles finish drawing. The panel lists the first four markets, with a "Show all" toggle for the rest. Each row shows:
268
+
269
+ - the correlation coefficient `ρ` (hover for a sentence such as "EUR/USD 82% correlated with XAU/USD"),
270
+ - an `inverse` tag when the market moves against the root symbol,
271
+ - the expected % move.
272
+
273
+ No host configuration is needed. The panel hides itself when replay stops, the result is closed, or the payload has no symbols. It switches to a compact layout when the popup is narrow.
274
+
240
275
  ### Layout helpers
241
276
 
242
277
  Injected CSS includes split-pane classes used in the demo:
@@ -307,7 +342,7 @@ The widget handles JSON messages with a `name` (and optional `data`) from the re
307
342
 
308
343
  | Name | Effect |
309
344
  | ---- | ------ |
310
- | `chart.play` | Replay / predicted candles on the chart. |
345
+ | `chart.play` | Replay / predicted candles on the chart. Optional `data.correlation` feeds the correlated markets panel. |
311
346
  | `chart.stop` | Stop replay and restore live ticks. |
312
347
  | `chart.requestResolution` | Re-post the current chart resolution to the iframe. |
313
348
  | `selector.closeResult` | Invoke `onCloseResult`. |
@@ -326,6 +361,27 @@ The host → embed helpers use a different shape: `{ type: "parent-origin" | "pa
326
361
 
327
362
  If your datafeed implements `getTimescaleMarks`, you can surface stored events from `localStorage` (`tv:selected-news-events`, `tv:clicked-news-event`) as marks on the time axis. See [`src/lib/data-feed.ts`](src/lib/data-feed.ts) in this repo.
328
363
 
364
+ ## Troubleshooting
365
+
366
+ | Symptom | Check |
367
+ | ------- | ----- |
368
+ | Scanner popup never appears | `chartWidget` is still `null`, `isShowScannerPopup` is `false`, or the current resolution is not in `availableIntervals`. |
369
+ | Scan / Pattern Tracker are greyed out | `iframeLoaded` is `false` or a scan is still loading. Set `iframeLoaded` to `true` from the iframe's `load` event. |
370
+ | "Please log in first" on every click | `localStorage.iccandle_token` is missing. Make sure `handleResultIframeLoad(iframe)` runs on load so the embed can post `auth.signIn`. |
371
+ | Hidden predicted candles show up as blocks | `chartMaskColors` does not match your chart pane background. See [Chart mask colors](#chart-mask-colors). |
372
+ | Messages from the embed are ignored | The widget only accepts `postMessage` from `WIDGET_RESULT_URL`. Don't proxy the embed through another origin. |
373
+
374
+ ## Changelog
375
+
376
+ ### 0.3.4
377
+
378
+ - Correlated markets panel under the scanner popup during AI simulation replay.
379
+ - Simulated bars past the last real candle stay on the chart's resolution grid and skip closed sessions.
380
+ - Removed the paid custom window-size dropdown from the popup. The toolbar now uses equal-width controls.
381
+ - Tooltips are positioned in the viewport, so they no longer get clipped by the popup or chart.
382
+ - Scanner symbol selection ignores tickers that are not in the catalog and keeps a stable order.
383
+ - Symbol search trigger has a fixed height, and chips no longer wrap.
384
+
329
385
  ## Development (this repo)
330
386
 
331
387
  | Script | Command | Purpose |