@dsh-ft/dsh-fft-paper-trading 0.7.0 → 0.7.1
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/lib/client.js +9 -1
- package/node_modules/@ftshare-lab/dsh-kline/CHANGELOG.md +47 -0
- package/node_modules/@ftshare-lab/dsh-kline/README.en.md +107 -201
- package/node_modules/@ftshare-lab/dsh-kline/README.md +106 -216
- package/node_modules/@ftshare-lab/dsh-kline/chart_service.py +3 -2
- package/node_modules/@ftshare-lab/dsh-kline/config/dsh-tool-catalog.json +103 -11
- package/node_modules/@ftshare-lab/dsh-kline/core/calc.py +8 -0
- package/node_modules/@ftshare-lab/dsh-kline/lib/chart-applications.js +1 -1
- package/node_modules/@ftshare-lab/dsh-kline/lib/chart-context.js +1 -1
- package/node_modules/@ftshare-lab/dsh-kline/lib/chart-observation.js +11 -1
- package/node_modules/@ftshare-lab/dsh-kline/lib/chart-sources.js +6 -1
- package/node_modules/@ftshare-lab/dsh-kline/lib/client.js +2971 -835
- package/node_modules/@ftshare-lab/dsh-kline/lib/drawing-feedback.js +35 -3
- package/node_modules/@ftshare-lab/dsh-kline/lib/pattern-groups.js +91 -0
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/PanelHost.d.ts +25 -0
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/chart-handoff.d.ts +5 -0
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/client-context.d.ts +2 -0
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/conversation.d.ts +4 -0
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/generated-view.d.ts +1 -1
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/host-options.d.ts +38 -0
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/host-panels.d.ts +55 -0
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/mode-preferences.d.ts +13 -1
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/ui-onboarding.d.ts +3 -9
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/pattern-groups.d.ts +2 -0
- package/node_modules/@ftshare-lab/dsh-kline/package.json +27 -6
- package/node_modules/@ftshare-lab/dsh-kline/scripts/run-dsh-kline.mjs +4 -1
- package/node_modules/@ftshare-lab/dsh-kline/server.py +46 -25
- package/node_modules/@ftshare-lab/dsh-kline/tools/automatic_analysis.py +158 -0
- package/node_modules/@ftshare-lab/dsh-kline/tools/channel_candidates.py +1 -1
- package/node_modules/@ftshare-lab/dsh-kline/tools/chart_context.py +1 -1
- package/node_modules/@ftshare-lab/dsh-kline/tools/chart_edits.py +30 -12
- package/node_modules/@ftshare-lab/dsh-kline/tools/chart_functions.py +53 -68
- package/node_modules/@ftshare-lab/dsh-kline/tools/chart_indicators.py +3 -1
- package/node_modules/@ftshare-lab/dsh-kline/tools/closed_daily.py +68 -0
- package/node_modules/@ftshare-lab/dsh-kline/tools/draw.py +18 -2
- package/node_modules/@ftshare-lab/dsh-kline/tools/drawing_feedback.py +2 -2
- package/node_modules/@ftshare-lab/dsh-kline/tools/fetch.py +2 -3
- package/node_modules/@ftshare-lab/dsh-kline/tools/nine_count.py +66 -0
- package/node_modules/@ftshare-lab/dsh-kline/tools/pattern_groups.py +103 -0
- package/node_modules/@ftshare-lab/dsh-kline/tools/polylines.py +12 -6
- package/node_modules/@ftshare-lab/dsh-kline/tools/price_patterns.py +311 -0
- package/node_modules/@ftshare-lab/dsh-kline/tools/range_candidates.py +1 -1
- package/node_modules/@ftshare-lab/dsh-kline/tools/recent_drawing_candidates.py +123 -0
- package/package.json +2 -2
- package/src/client/index.js +8 -0
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/PaperKlinePanel.d.ts +0 -15
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/canvas-panel.d.ts +0 -33
- package/node_modules/@ftshare-lab/dsh-kline/lib/types/client/host-services.d.ts +0 -55
package/lib/client.js
CHANGED
|
@@ -9,7 +9,7 @@ window.__ModuleLoader__.load({
|
|
|
9
9
|
|
|
10
10
|
const ROUTE = '/api/ft-paper-trading'
|
|
11
11
|
/** Release number stamped into the Feedback link title at build time. */
|
|
12
|
-
const PAPER_VERSION = '0.7.
|
|
12
|
+
const PAPER_VERSION = '0.7.1'
|
|
13
13
|
/** Public repository; the panel links out and collects nothing itself. */
|
|
14
14
|
const ISSUE_NEW = 'https://github.com/gigaflw/dsh-fft-paper-trading/issues/new'
|
|
15
15
|
/**
|
|
@@ -3257,6 +3257,14 @@ window.__ModuleLoader__.load({
|
|
|
3257
3257
|
'paperTrading.kline': { kind: 'single', scope: 'root' },
|
|
3258
3258
|
},
|
|
3259
3259
|
}, Dashboard))
|
|
3260
|
+
// The declared slot stays empty until dsh_kline fills it through its
|
|
3261
|
+
// optional host contract; without that plugin (or on an older chart) the
|
|
3262
|
+
// rail keeps its built-in simplified chart instead.
|
|
3263
|
+
ctx.inject(['klinePanels'], scope => {
|
|
3264
|
+
const panels = scope.get('klinePanels')
|
|
3265
|
+
if (panels === undefined) return () => {}
|
|
3266
|
+
return panels.mount('paperTrading.kline')
|
|
3267
|
+
})
|
|
3260
3268
|
}
|
|
3261
3269
|
|
|
3262
3270
|
const inject = ['slots']
|
|
@@ -2,6 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
本项目遵循 [Semantic Versioning](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## 未发布
|
|
6
|
+
|
|
7
|
+
## 0.6.11 - 2026-11-13
|
|
8
|
+
|
|
9
|
+
- README 在 npm 版本徽章旁显示自动更新的近一个月下载量;中英文与公开插件目录同步。
|
|
10
|
+
- 新增可选宿主面板挂载与界面偏好契约:宿主可复用图表、联动标的选择,并按需关闭浮动入口和首启提示;独立安装保留默认行为。
|
|
11
|
+
- 修复宿主面板重复挂载与清理的归属:每次挂载独立释放,旧清理函数不会误删新图表;支持槽位服务重连,并补充生命周期回归测试。
|
|
12
|
+
- 重写中英文 README:在首页列明十二类绘图及自动/手动操作,恢复最近的 ABC 与下降通道实测,保留高清大盘、主图对比和箱体突破展示。
|
|
13
|
+
- 补充 npm 安装入口;市场截图清单优先展示 ABC、通道与高清形态实例。
|
|
14
|
+
|
|
15
|
+
## 0.6.10 - 2026-11-11
|
|
16
|
+
|
|
17
|
+
- 修复 DSH 0.2 工具返回成功但原生 K 线标签不自动打开:兼容宿主的独立 `role: tool` 结果消息,保留旧版结果格式与调用归属校验。
|
|
18
|
+
- 修复自动新建标签后停留在大盘页:把刚完成的分析交接给同一对话的新标签;新对话、其他宿主实例及网页重载不会继承该交接。
|
|
19
|
+
- 新版宿主依据事件的实时追加/历史加载类型判断是否自动开图,避免快速返回结果被固定等待窗口遗漏;加载旧历史不抢占当前页面。
|
|
20
|
+
- 界面选项改称“工作台标签”,避免让新版宿主用户误以为必须安装 Better Sidebar;中英文指南同步说明原生标签与旧宿主可选适配。
|
|
21
|
+
|
|
22
|
+
## 0.6.9 - 2026-11-11
|
|
23
|
+
|
|
24
|
+
- 重构中英文 README,按功能展示、安装、使用、数据范围及文档索引组织;详细安装排障与历史绘图演示移入独立指南。大盘、主图对比和箱体突破重新采集原生 Retina 无损 PNG;双安装包同步包含指南与高清图片。
|
|
25
|
+
- 点位面板的「手动添加」改为与「重新分析点位」并列的橙色按钮,点击展开或收起输入区。
|
|
26
|
+
- 精简预警和对比面板的常驻说明;指标参数「设置」改为与「应用」并列的同款按钮。
|
|
27
|
+
- 隔离图表内部控件的显示层级,防止工具栏覆盖宿主侧栏拖拽边线、造成左侧边缘缺口。
|
|
28
|
+
- 修复形态/九转模式隐藏清除确认区、顶部搜索框覆盖设置面板的问题;溢出菜单改用统一的矢量箭头,移除绘图面板中的「规则与数据说明」入口。
|
|
29
|
+
- 将自动绘图的五种分析入口收敛到共享注册表;DSH 与 Codex 共用参数默认值、候选到图形的映射和版本。所有自动候选统一用当前图结果引用落图,图表端默认显示引擎返回的第一项。
|
|
30
|
+
- 完善 v0.6.8 已有的双顶/双底、头肩顶/底、平台状态与基础九转的自动绘图交互。
|
|
31
|
+
- 「绘图」统一提供近期候选自动绘制和手动选点;图形直接显示并保留,用户可切换候选或通过「清除绘图」移除。
|
|
32
|
+
- 形态和九转作为受保护的整体图表对象管理;按市场本地收盘时间过滤未完成日线,记录候选首次可知时间与状态事件。
|
|
33
|
+
- 修复九转标记上下颠倒:上涨计数显示在 K 线高点上方,下跌计数显示在低点下方;已有九转图形也按正确的 K 线边缘显示。计数到 9 后若比较方向反转,按规则从 1 重新开始。
|
|
34
|
+
- 九转数字按上涨/下跌配色,普通计数改用简洁文字、仅突出完成的 9;图表对象更新不再被误认为行情更新,避免自动重复绘制和画面抖动。自动更新失败时停止同一份数据上的循环重试,仍可手动重试。
|
|
35
|
+
- 绘图定位保留选中形态的视野;价格轴宽度刷新不再重置图表位置,画布缩放围绕当前形态或可见区间中心进行。候选切换时展示对应的确认/失效状态。
|
|
36
|
+
- 「绘图」默认展示引擎返回的最新合格形态,并标明其后续失效或过期状态;其他候选仍可手动点选。头肩底锚点标签改放在低点下方,贴近主图底边时回避到上方;平台未确认期间用虚线延续冻结边界到分析截止日。
|
|
37
|
+
- 修复价格形态边界与绘制:左侧历史不足时不再把最后一根未来 K 线读入前置趋势;头肩形态的斜颈线按 K 线索引延伸至分析事件或截止日;双顶/底的形态外辅助走势改用虚线,与已确认拐点区分。
|
|
38
|
+
- 双顶/底明确标注两个顶/底与颈线;移除末端拐点直连远处收盘价的虚线,突破标记落在实际确认日 K 线上,避免画出不存在的直线走势。双底状态标签避开第一个底部标记。
|
|
39
|
+
- 平台形态排除持续单向漂移及仅按顺序触及一侧再触及另一侧的区间,避免将明显的上行/下行段画成横盘箱体;旧平台区间候选接口保持原规则。
|
|
40
|
+
- 修复刷新网页后旧图表视图短时间仍被记为活动图表、触发“多个活动图表”提示:页面离开时立即上报关闭,返回页面时重新发布完整当前图表。
|
|
41
|
+
- 图表时间栏、主工具栏与绘图操作在窄画布中保持单行,放不下的按钮进入末尾菜单;统一按钮高度并压缩绘图面板宽度与字段间距,顶部搜索栏在窄屏中保持单行。
|
|
42
|
+
|
|
43
|
+
- 多标的对比支持主图叠加、搜索与常用指数快捷项;指标分图支持折叠、恢复和控制提示。
|
|
44
|
+
- 准备公开 npm 包及首次发布文档;尚未上传 npm,也未关联外部市场目录。
|
|
45
|
+
|
|
46
|
+
## 0.6.8 - 2026-11-09
|
|
47
|
+
|
|
48
|
+
- Shared closed-daily double-top/bottom, head-and-shoulders, frozen-range status and transparent nine-count analyses.
|
|
49
|
+
- Guarded atomic pattern and nine-count snapshot groups for DSH and Codex, with an on-demand chart workbench.
|
|
50
|
+
- Conservative local-market close filtering, causal state events and rule/data-quality metadata.
|
|
51
|
+
|
|
5
52
|
## 0.6.7 - 2026-11-06
|
|
6
53
|
|
|
7
54
|
- 修复 DSH 首次依赖安装耗尽宿主重连次数后工具无法注册:Node 在准备期间保持 MCP 和完整工具目录,后端退出后在同一连接恢复且不重放结果未知的操作。
|
|
@@ -1,265 +1,171 @@
|
|
|
1
|
-
#
|
|
1
|
+
# FT K-Line · 非凸 K 线助手
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Explore market data in **DeepSeek Harness** and **Codex**. Analyze, draw, and revise charts through natural language, or pick anchors on the chart yourself.
|
|
4
4
|
|
|
5
|
-
[
|
|
5
|
+
[简体中文](README.md) · English
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://github.com/FTShare-Lab/dsh_kline/actions/workflows/install.yml) [](https://www.npmjs.com/package/@ftshare-lab/dsh-kline) [](https://www.npmjs.com/package/@ftshare-lab/dsh-kline) [](https://github.com/FTShare-Lab/dsh_kline/releases) [](LICENSE)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
[Drawing tools](#supported-drawing-tools) · [ABC and channel examples](#natural-language-drawing-in-action) · [Drawing workbench](#drawing-workbench-and-price-patterns) · [Market and comparison](#market-overview-and-chart-comparison) · [Install](#install) · [Documentation](#documentation)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Current release: **v0.6.11**. npm package: **`@ftshare-lab/dsh-kline`**. Drawings appear directly and remain when the controls are closed. Switch candidates, continue editing, or clear them yourself.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
| --- | --- | --- | --- |
|
|
15
|
-
| DeepSeek Harness Web | Yes | Yes | Yes |
|
|
16
|
-
| Codex desktop | Yes, in an app card | Yes, after opening the current chart session | Yes |
|
|
17
|
-
| Codex CLI | No interactive chart | No chart drawing | Yes, as structured results |
|
|
18
|
-
|
|
19
|
-
The Codex plugin is currently **v0.6.7**, available through this repository's public **FTShare GitHub marketplace**. It is not listed in the official public plugin directory. DSH retains its existing installation path. The DSH screenshots and persistent-watchlist description below apply to DSH Web; see [Codex setup and differences](#use-with-codex) for the separate plugin.
|
|
13
|
+
## Supported drawing tools
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
Chat and the chart panel use the same drawing capabilities. Automatic drawing uses the **latest closed daily bars already loaded in the current chart** and selects the newest qualifying candidate by default. You can also choose a candidate or specify dates and prices.
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
| Drawing tool | Automatic drawing | Manual anchors and natural-language control |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| **Horizontal line** | Find recent high/low pivot price candidates | Specify a price or select a candle; use it as support, resistance, or a custom level |
|
|
20
|
+
| **Trend line** | Find a qualifying recent two-anchor move | Specify two times and prices; create or adjust the segment |
|
|
21
|
+
| **Parallel channel** | Find recent channel candidates | Select three anchors; adjust boundaries and the optional midpoint |
|
|
22
|
+
| **Range box** | Find recent ranges meeting boundary-contact and drift rules | Select the interval and upper/lower boundaries; edit the name, color, and fill |
|
|
23
|
+
| **Fibonacci retracement** | Find anchors from recent swings | Specify endpoints and ratios; edit or remove the group together |
|
|
24
|
+
| **ABC swing / wave labels** | Find 0/A/B/C swing candidates meeting geometric rules | Pick anchors or have the host verify them before drawing; revise a named point |
|
|
25
|
+
| **Double top** | Identify the structure and its subsequent state | Supply structural anchors, subject to the same recognition rules |
|
|
26
|
+
| **Double bottom** | Identify the structure and its subsequent state | Supply structural anchors, subject to the same recognition rules |
|
|
27
|
+
| **Head and shoulders top** | Identify shoulders, head, and neckline | Supply five structural anchors and validate the pattern |
|
|
28
|
+
| **Head and shoulders bottom** | Identify the inverse structure and neckline | Supply five structural anchors and validate the pattern |
|
|
29
|
+
| **Platform breakout / failure** | Freeze range boundaries and mark pending, confirmed, or failed breakouts | Use a range box for a manually chosen interval; states come from price analysis |
|
|
30
|
+
| **Nine Count** | Display upward/downward 1–9 counts and update with chart data | Counts are calculated from prices; adjust the display range and style |
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
**ABC candidates and labels are not a complete Elliott-wave recognizer.** Price patterns and Nine Count currently support closed daily bars for A-share, Hong Kong, and US stocks. When no candidate qualifies, the tool explains that instead of forcing a drawing.
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
### Indicators and additional annotations
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
- **Indicator panel:** SMA, EMA, VOL, MACD, KDJ, RSI, BOLL, ATR, and VWAP. Selected SMA/EMA/BOLL results can also be added as independent objects through the host.
|
|
37
|
+
- **Chat-driven annotations:** text, numbers, arrows, diamonds, and labeled polylines. Continue editing by object name or named point.
|
|
38
|
+
- **Advanced tool interfaces:** conditional price series, price bands, and conditional sticks. See [function and drawing coverage](docs/chart-functions.md) for inputs, display behavior, and limits.
|
|
39
|
+
- **Object management:** create, rename, recolor, update anchors, and delete; multiple objects can coexist on one chart. The 201 TA-Lib functions support queries and calculations; only implemented drawing and indicator families can be put on the chart.
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
## Natural-language drawing in action
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
### Verify an ABC candidate, then draw its anchors
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
DeepSeek checks Wolong Electric's four 0/A/B/C anchors against daily candles before drawing through the plugin. The full capture preserves both the conversation and the visible result.
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
[](docs/images/natural-language-abc-wolong-2026-10-27.png)
|
|
46
48
|
|
|
47
|
-
###
|
|
49
|
+
### Continue by adding a descending channel
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
2. Run these commands. The first adds the source and follows CI-validated `main`; the second installs and enables the plugin:
|
|
51
|
+
A follow-up request adds parallel channel boundaries after the host checks their anchors. The existing ABC labels remain on the same chart.
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
codex plugin marketplace add FTShare-Lab/dsh_kline --ref main
|
|
54
|
-
codex plugin add ft-kline@ftshare
|
|
55
|
-
```
|
|
53
|
+
[](docs/images/natural-language-descending-channel-wolong-2026-10-27.png)
|
|
56
54
|
|
|
57
|
-
|
|
55
|
+
The two full captures above are from October 27, 2026 and retain the conversation and interface from that session. Click an image for its original resolution; current drawing controls are described below.
|
|
58
56
|
|
|
59
|
-
|
|
57
|
+
Example requests:
|
|
60
58
|
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
```text
|
|
60
|
+
Open Wolong Electric's daily chart. Verify a recent ABC swing candidate and draw it if it qualifies.
|
|
61
|
+
Add a descending channel to the same chart, keeping the ABC labels.
|
|
62
|
+
Draw the newest qualifying double bottom and explain its current state.
|
|
63
|
+
Show Nine Count for the latest 30 closed daily bars.
|
|
64
|
+
Make “Key support” blue and move it to 30.8.
|
|
64
65
|
```
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
An analysis request returns analysis. An explicit drawing request puts the result on the chart. Specified anchors and candidate choices take priority.
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
## Drawing workbench and price patterns
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
codex plugin marketplace upgrade ftshare
|
|
72
|
-
codex plugin add ft-kline@ftshare
|
|
73
|
-
```
|
|
71
|
+
Open **Draw** → select a tool → **Draw now**. Use **Pick anchors manually** to select your own points and **Settings** to adjust parameters. Drawings appear directly, without a separate save step. Closing or collapsing the controls preserves them; **Clear** is inside the drawing panel.
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
### Range formation, breakout, and failure states
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
MSFT daily example: the range forms from August 28 to September 25, with an upward breakout confirmed on October 6. The chart shows its boundaries and actual confirmation date; subsequent prices do not enlarge the frozen range.
|
|
78
76
|
|
|
79
|
-
|
|
77
|
+
[](docs/images/platform-breakout-msft-v0.6.9.png)
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
codex plugin marketplace add "/absolute/path/ft-kline-v0.6.7"
|
|
83
|
-
codex plugin add ft-kline@ftshare-local
|
|
84
|
-
```
|
|
79
|
+
Double tops/bottoms and head-and-shoulders patterns likewise show necklines and candidate, confirmation, or failure states. Nine Count displays individual counts; it does not include a full DeMARK 13 Countdown. See [pattern rules](docs/price-pattern-rules-v1.md).
|
|
85
80
|
|
|
86
|
-
|
|
81
|
+
## Market overview and chart comparison
|
|
87
82
|
|
|
88
|
-
###
|
|
83
|
+
### Put comparison lines in the main candlestick chart
|
|
89
84
|
|
|
90
|
-
|
|
85
|
+
Search for stocks, indices, or ETFs and overlay their price-performance lines behind the main chart. The primary symbol retains its candles and indicators. Hide or remove comparison lines independently.
|
|
91
86
|
|
|
92
|
-
|
|
87
|
+
[](docs/images/main-chart-comparison-v0.6.9.png)
|
|
93
88
|
|
|
94
|
-
|
|
89
|
+
*Lines use a common normalization baseline to compare cumulative percentage changes. They do not compare raw prices across symbols or calculate technical indicators for the comparison lines.*
|
|
95
90
|
|
|
96
|
-
|
|
91
|
+
### Market overview
|
|
97
92
|
|
|
98
|
-
|
|
93
|
+
Browse major A-share, Hong Kong, and US indices, sector rankings, and unusual-trading lists. Select a symbol to continue in its chart and research panels.
|
|
99
94
|
|
|
100
|
-
|
|
95
|
+
[](docs/images/market-overview-v0.6.9.png)
|
|
101
96
|
|
|
102
|
-
|
|
97
|
+
The market, comparison, and MSFT platform captures preserve native Retina pixels as lossless PNGs. Prices are snapshots from capture time.
|
|
103
98
|
|
|
104
|
-
|
|
99
|
+
## Levels, review, and research
|
|
105
100
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
| Feature | What it does |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| **Support and resistance** | Analyze reference prices in Levels, add custom levels, and draw them on the current chart |
|
|
104
|
+
| **Interval review** | Inspect interval returns and drawdown alongside the chart |
|
|
105
|
+
| **News and company information** | Read symbol news, company information, and research panels, subject to source coverage and permissions |
|
|
106
|
+
| **Watchlists and groups** | Save, group, sort, import, and open symbols in batches; DSH retains these across conversations |
|
|
109
107
|
|
|
110
|
-
##
|
|
108
|
+
## Install
|
|
111
109
|
|
|
112
|
-
|
|
110
|
+
Supports macOS, Linux, and native Windows. First launch downloads dependencies and may take several minutes.
|
|
113
111
|
|
|
114
|
-
###
|
|
112
|
+
### DeepSeek Harness
|
|
115
113
|
|
|
116
|
-
|
|
114
|
+
Install a working DSH Web host and **Python 3.11+**, then run:
|
|
117
115
|
|
|
118
116
|
```bash
|
|
119
|
-
dsh plugin --profile web add
|
|
117
|
+
dsh plugin --profile web add @ftshare-lab/dsh-kline@0.6.11
|
|
120
118
|
```
|
|
121
119
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
The plugin supports macOS, Linux, and native Windows. Install a working DSH Web host and Python 3.11 or newer first. On Windows, use the [python.org installer](https://www.python.org/downloads/windows/) with the Python Launcher enabled. Git Bash and WSL are not required. First-launch details are stored in `dsh_kline/bootstrap.log` under the user cache directory; the Windows default is `%LOCALAPPDATA%\dsh_kline\bootstrap.log`.
|
|
125
|
-
|
|
126
|
-

|
|
127
|
-
|
|
128
|
-
### 2. Choose either entry point
|
|
129
|
-
|
|
130
|
-
**Ask AI** in a conversation, for example:
|
|
131
|
-
|
|
132
|
-
- `Show the K-line chart for Zijin Mining and its trend over the last month`
|
|
133
|
-
- `Show Tencent's daily chart and mark support and resistance`
|
|
134
|
-
- `Analyze NVIDIA's volume, MACD, and RSI over the past month`
|
|
135
|
-
- `What recent news and fundamentals should I know about this company?`
|
|
136
|
-
- `Draw a blue level at 1300 on the current chart, then change that object to green`
|
|
137
|
-
- `Propose three anchors for a descending channel; explain the deviation and wait for my confirmation`
|
|
138
|
-
- `Screen my watchlist for ABC candidates; verify one symbol's 0/A/B/C pivots on its daily chart before drawing, and tell me whether C is confirmed`
|
|
139
|
-
|
|
140
|
-
**Open the workspace directly**: click the K button on the right, or choose **非凸 K 线助手 / dsh_kline** from the `+` menu where workspace Tabs are available. Search by name or ticker; exchange suffixes are not required.
|
|
141
|
-
|
|
142
|
-
Both entry points can operate on the same new drawing objects in the active chart. In the chart toolbar, **Draw** opens the drawing workbench: choose a tool, click candles or enter parameters, preview, then confirm. Conversations retain separate chart states; watchlists remain user-level data.
|
|
143
|
-
|
|
144
|
-
## Using the chart
|
|
145
|
-
|
|
146
|
-
1. Search for a company or ticker at the top.
|
|
147
|
-
2. Pick a time range and candle timeframe. Intraday availability depends on the market and data entitlement.
|
|
148
|
-
3. Enable the indicators you need, then pan, zoom, or use the crosshair for detail.
|
|
149
|
-
4. Select **Key levels** for support and resistance, or **Draw** to choose a drawing tool, pick anchors or enter parameters, and save the preview. Manage your own price lines under **Levels**.
|
|
150
|
-
5. Click two candles in sequence to review return, range, drawdown, and trading activity for that interval.
|
|
151
|
-
6. Select the star beside a symbol to add it to a watchlist.
|
|
152
|
-
|
|
153
|
-
Where a **UI** menu is available, choose Automatic, Classic sidebar, or workspace Tab. Automatic uses the best interface your current Harness supports; when Tabs are unavailable, the regular K-line sidebar continues to work.
|
|
154
|
-
|
|
155
|
-
### Sidebar compatibility
|
|
156
|
-
|
|
157
|
-
DeepSeek Harness provides its own right sidebar, so **Better Sidebar is not required** to open the K-line sidebar. When a compatible Better Sidebar is installed, the plugin can also open the chart as a workspace Tab. This is an optional UI integration, not a requirement for quotes, indicators, or drawing. Use **UI** to choose Automatic, sidebar, or Tab; Automatic selects from the interface capabilities exposed by the current host. Installing Better Sidebar alone does not mean every version and layout has been validated.
|
|
158
|
-
|
|
159
|
-
## Quotes and data sources
|
|
160
|
-
|
|
161
|
-
FTShare is the default optional source. After you configure an API key, the plugin exposes the quote, intraday, news, and company-data capabilities available to your account. Availability differs by market and plan.
|
|
120
|
+
GitHub installation is also available:
|
|
162
121
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
The plugin reuses FTShare credentials in this order: an `FTSHARE_API_KEY` already injected into the current DSH service, an explicitly configured `FTSHARE_API_KEY_FILE`, a Key saved in the DSH FTShare settings, and a local credential previously saved by this plugin. If the key is already available to the process that starts DSH, it is used automatically. Installing the FTShare SDK alone, or storing a key in another app's private configuration, is not enough for the plugin to read it.
|
|
167
|
-
|
|
168
|
-
When the DSH FTShare settings plugin is installed, the host publishes its Key to the MCP server, which re-reads it before every request — so adding, rotating, or clearing the Key in the settings page needs no dsh restart. That Key belongs to the settings page; this plugin never displays or clears it.
|
|
169
|
-
|
|
170
|
-
For safety, the plugin never scans `.env` files, shell configuration, keychains, or other apps' configuration files, and never displays a key or path. **Settings → Data source** identifies the active source; use **Manage FTShare configuration** to paste and test a replacement key, either for the current session or saved locally for future launches.
|
|
171
|
-
|
|
172
|
-
Theme and language follow the DSH host by default. **Settings → Theme/Language** also offers manual choices and a way back to **Follow host (default)**.
|
|
173
|
-
|
|
174
|
-
[FTShare's free-plan endpoints](https://market.ft.tech/gateway/doc/p/pb8eizu3) still require a registered API key. Without a key, some historical daily A-share bars can use BaoStock, HK/US daily bars can use Tencent, and selected broad-market indices have separate free fallbacks. Intraday bars, news and other capabilities still depend on source coverage and permissions. Existing valid OHLCV data, including rows supplied by the host, can still drive local indicators and drawing. The UI reports the applicable source or error when data is rate-limited, unavailable, or outside the account's entitlement.
|
|
175
|
-
|
|
176
|
-
## Frequently asked questions
|
|
177
|
-
|
|
178
|
-
**Why is an intraday chart unavailable?**
|
|
179
|
-
Intraday access depends on the symbol's market, your account plan, and the source's currently supported coverage. Test the connection in Data source first. Daily, weekly, and monthly views do not require the intraday entitlement, but individual-stock candles still need a working data source; FTShare's free plan requires an API key too.
|
|
180
|
-
|
|
181
|
-
**What if the first launch fails on Windows?**
|
|
182
|
-
|
|
183
|
-
Inspect `%LOCALAPPDATA%\dsh_kline\bootstrap.log`. From v0.6.4, dependency upgrades reuse a working venv; rebuilding also tries its recorded base interpreter and Desktop's bundled standard Python. Trimmed distributions lacking venv/ensurepip still need a standard Python 3.11+ installation. Check `py -3.11 --version` (newer versions work), or set `DSH_KLINE_PYTHON` to the full `python.exe` path before starting DSH. Correcting the configuration invalidates the old retry delay. Nested bundles no longer need a profile-root K-line package, but bundles pinning an older plugin must update it. DSH installation and Windows sandbox issues remain host-level concerns.
|
|
122
|
+
```bash
|
|
123
|
+
dsh plugin --profile web add github:FTShare-Lab/dsh_kline
|
|
124
|
+
```
|
|
184
125
|
|
|
185
|
-
|
|
186
|
-
This is intentional: each chart belongs to its conversation, so an analysis in one conversation cannot replace another's chart. Search or start a new analysis in the other conversation when needed.
|
|
126
|
+
You can also find `dsh_kline` in the plugin marketplace. Its version and download information depend on catalog synchronization. See the [npm package](https://www.npmjs.com/package/@ftshare-lab/dsh-kline) for the published version; downloads are not unique installations.
|
|
187
127
|
|
|
188
|
-
|
|
189
|
-
Quotes can be delayed and may differ with adjustment policy, exchange conventions, market-close state, and upstream services. Use appropriately licensed feeds for commercial, high-frequency, or latency-sensitive work.
|
|
128
|
+
[](docs/images/dsh-market.png)
|
|
190
129
|
|
|
191
|
-
|
|
130
|
+
After enabling it, click **K** or request analysis in chat. Newer DSH versions provide native right-sidebar tabs without Better Sidebar. Choose **UI → Workspace tab**, or continue using the classic K sidebar. v0.6.10's native auto-open was tested on DSH 0.2.1-rc.5, a prerelease host.
|
|
192
131
|
|
|
193
|
-
###
|
|
132
|
+
### Codex
|
|
194
133
|
|
|
195
|
-
|
|
134
|
+
Install a plugin-capable Codex, Git, **Node.js 22.19+**, and **Python 3.11+**:
|
|
196
135
|
|
|
197
|
-
|
|
198
|
-
|
|
136
|
+
```bash
|
|
137
|
+
codex plugin marketplace add FTShare-Lab/dsh_kline --ref main
|
|
138
|
+
codex plugin add ft-kline@ftshare
|
|
139
|
+
```
|
|
199
140
|
|
|
200
|
-
|
|
201
|
-
measures, executes and reports; it does not embed another AI or replay predefined drawing skills.
|
|
202
|
-
Explicit parameters may execute directly; proposal-first requests must wait for approval.
|
|
203
|
-
Host explanations and professional anchor selection can be wrong and require user judgement.
|
|
141
|
+
Reopen Codex and ask “Open China Merchants Bank's daily chart.” FTShare is this project's public GitHub plugin source.
|
|
204
142
|
|
|
205
|
-
|
|
143
|
+
| Host | Interactive chart and manual drawing | Chat-driven drawing | Quotes and structured analysis |
|
|
144
|
+
| --- | --- | --- | --- |
|
|
145
|
+
| DSH Web | Yes | Yes | Yes |
|
|
146
|
+
| Codex Desktop | Inside an App card | Yes | Yes |
|
|
147
|
+
| Codex CLI | No canvas | No chart writes | Yes |
|
|
206
148
|
|
|
207
|
-
|
|
208
|
-
The plugin does not guess missing dates, snap anchors or fetch extra candles to repair edits.
|
|
209
|
-
- Trend segments and channels are finite, with no automatic extension or logarithmic geometry.
|
|
210
|
-
Channels and rectangles retain their creation interval.
|
|
211
|
-
- Guarded edits target stable IDs without resetting candles, indicators or the viewport.
|
|
212
|
-
Manual drawings, automatic annotations and AI objects remain separate.
|
|
213
|
-
- Confirmed drawings can restore and be edited after browser refresh within the same host run.
|
|
214
|
-
Conversations are isolated. Returning to a conversation restores its last confirmed drawing
|
|
215
|
-
checkpoint, **not necessarily its last manually selected interval, range or viewport**.
|
|
216
|
-
- Workbench point selection and form editing are supported; AI mouse dragging, undo, cross-process old-chart editing and complete automatic failure
|
|
217
|
-
recovery are not supported. Unknown outcomes stop automatic retries.
|
|
218
|
-
- **Clear drawings and annotations** asks for confirmation, then removes AI objects,
|
|
219
|
-
analysis annotations, manual drawings, and custom levels for the current symbol and interval.
|
|
220
|
-
Indicators and alerts remain. Request an exact AI target when you want to delete only one object.
|
|
221
|
-
- An object may be outside the visible time/price range. Object state and application receipts
|
|
222
|
-
do not prove screen pixels, professional pattern quality or vendor quote correctness.
|
|
223
|
-
- Minute availability depends on source/permissions; not all markets, minute sizes or operation combinations are accepted. Channels, boxes and ABC labels are not automatically recognized professional patterns. Chan analysis is not included. The 201 TA-Lib functions are primarily read-only; only the selected SMA/EMA/BBANDS outputs have a guarded drawing conversion.
|
|
149
|
+
See the [complete guide](docs/guide.en.md) for pinned archives, updates, migration, and startup troubleshooting.
|
|
224
150
|
|
|
225
|
-
|
|
226
|
-
Read fresh context after approval and verify against independently retained approved parameters.
|
|
227
|
-
A `context_ref` is not a `chart_session`. Read-only `preview_chart_channel` and `verify_chart_drawings`
|
|
228
|
-
measure geometry/check parameters; neither selects patterns or grants drawing permission.
|
|
229
|
-
Legacy per-family tools manipulate explicit snapshots, not the guarded live-chart workflow.
|
|
151
|
+
## Data and scope
|
|
230
152
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
153
|
+
- **Sources:** FTShare can be configured and tested under Settings → Data source. Without a key, selected A-share, Hong Kong, US, and index historical daily sources may be available; coverage depends on the public provider.
|
|
154
|
+
- **Permissions and periods:** minute bars, news, and company information depend on the source and permissions. Automatic drawing, patterns, and Nine Count currently use loaded, closed daily bars for A-share, Hong Kong, and US stocks.
|
|
155
|
+
- **Editing:** drawings use real candles in the current chart. Unknown sources, expired results, or ambiguous active views stop edits with an explanation. Dragging anchors and undo are not currently supported.
|
|
156
|
+
- **Retention:** DSH watchlists and groups persist across conversations. Codex charts, watchlists, and temporary App keys remain in the current connection's memory and do not inherit DSH settings. Drawing recovery across service restarts is not guaranteed.
|
|
234
157
|
|
|
235
|
-
|
|
158
|
+
Market data may be delayed. Patterns and counts support research and review, without guaranteed trading returns. See [key-less coverage](docs/anonymous-market-support.md) and [free Hong Kong/US daily sources](docs/free-foreign-daily.md).
|
|
236
159
|
|
|
237
|
-
|
|
160
|
+
## Documentation
|
|
238
161
|
|
|
239
|
-
|
|
|
162
|
+
| Topic | Link |
|
|
240
163
|
| --- | --- |
|
|
241
|
-
|
|
|
242
|
-
|
|
|
243
|
-
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
In `external` mode, the host owns the interpreter, dependency search paths, and isolation settings (such as `PYTHONPATH`, `PYTHONNOUSERSITE`, or Windows embedded Python's `._pth`); no other interpreter is discovered. `auto` mode uses the bounded discovery and repair described above. Set `DSH_KLINE_CHART_PORT=0` for a dynamic port. The MCP patch explicitly forwards runtime variables without changes to DSH core.
|
|
250
|
-
|
|
251
|
-
## Updates and license
|
|
252
|
-
|
|
253
|
-
See [Releases](https://github.com/FTShare-Lab/dsh_kline/releases) for version history. This project is released under the [MIT License](LICENSE); frontend provenance is in [PROVENANCE.md](PROVENANCE.md).
|
|
254
|
-
|
|
255
|
-
Maintainers changing tools, annotations, resources or the App bridge must regenerate the packaged catalog with `python scripts/generate-codex-catalog.py`; `--check` and regression tests detect stale catalogs.
|
|
256
|
-
|
|
257
|
-
The public `marketplace/ft-kline/` snapshot is generated from the same Codex package allowlist. After editing source, plugin manifests or README files, run `pnpm sync:codex-marketplace` and commit the generated files. CI runs `pnpm verify:codex-marketplace` and independently starts the directory in Desktop and CLI modes. Do not edit generated files directly; see [marketplace maintenance](marketplace/README.md).
|
|
258
|
-
|
|
259
|
-
### DSH startup diagnostics
|
|
260
|
-
|
|
261
|
-
MCP discovery remains connected while Python is prepared; `dsh_kline_runtime_status` reports `preparing`, `recovering`, or `ready`. Backend restarts never replay operations with unknown outcomes. Chart registration retries without terminating other MCP tools.
|
|
262
|
-
|
|
263
|
-
Request `/dsh-kline/healthz` on the current DSH Web origin: 200 confirms the locator and HTTP backend instance agree; 503 identifies the failure. It does not check provider permissions or MCP tool execution. Historical `/dsh-kline/session?session=…` snapshots are not a health check. Use the locator's actual service port rather than assuming 8765.
|
|
264
|
-
|
|
265
|
-
Dependency logs remain in `bootstrap.log`; backend stderr is persisted to `logs/backend-<host_pid>.log` with one `.previous` rotation at approximately 1 MiB. The default cache is `~/.cache/dsh_kline` on macOS/Linux (honoring `XDG_CACHE_HOME`) or `%LOCALAPPDATA%\dsh_kline` on Windows. `DSH_KLINE_CACHE_DIR` overrides it; `DSH_KLINE_RUNTIME_DIR` independently overrides runtime files. Health responses never expose the service token.
|
|
164
|
+
| Install, updates, keys, troubleshooting | [Complete guide](docs/guide.en.md) |
|
|
165
|
+
| Automatic drawing and extension | [Shared drawing architecture](docs/automatic-drawing.md) |
|
|
166
|
+
| Pattern definitions and real samples | [Rules](docs/price-pattern-rules-v1.md) · [Samples](docs/price-pattern-samples-v1.md) |
|
|
167
|
+
| Technical functions and advanced annotations | [Function and drawing coverage](docs/chart-functions.md) |
|
|
168
|
+
| Host and provider integration | [Embedding](docs/embedding.md) · [Provider adaptation](docs/provider-adaptation.md) |
|
|
169
|
+
| Releases and acceptance | [Changelog](CHANGELOG.md) · [v0.6.11 release notes](docs/release-notes-v0.6.11.md) · [Acceptance](docs/release-acceptance-v0.6.11.md) |
|
|
170
|
+
|
|
171
|
+
[MIT License](LICENSE) · [Frontend provenance](PROVENANCE.md) · [GitHub Releases](https://github.com/FTShare-Lab/dsh_kline/releases)
|