longbridge-chanlun
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-chanlun
longbridge-chanlun
缠论(Chan Theory)形态识别引擎:基于 OHLCV 日线数据,自动检测顶底分型、笔、线段、中枢,并生成一买/一卖、二买/二卖、三买/三卖信号。
Chan Theory Pattern Recognition Engine: Based on daily OHLCV data, automatically detect top/bottom fractals, Bi, Segments, Zhongshu, and generate Buy 1/Sell 1, Buy 2/Sell 2, Buy 3/Sell 3 signals.
Requirements
Requirements
⚠️ 额外依赖 / Extra dependency required此 skill 依赖第三方 Python 库 czsc,使用前需手动安装:bashpip install czsc若环境无法安装,LLM 将回退到手动实现基础分型逻辑(精度较低)。 This skill requires the czsc Python library. Install it before use:pip install czsc
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
⚠️ Extra dependency requiredThis skill depends on the third-party Python library czsc, which needs to be installed manually before use:bashpip install czscIf installation is not possible in the environment, the LLM will fall back to manually implementing basic fractal logic (lower accuracy). This skill requires the czsc Python library. Install it before use:pip install czsc
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
When to use
When to use
- 用户询问缠论相关分析:"AAPL.US 缠论分析"、"700.HK 现在在哪个买点"、"帮我看看 TSLA 的中枢"
- 识别分型(顶分型/底分型)、笔(上升笔/下降笔)、线段结构
- 判断当前买卖点类型(一买/二买/三买/一卖/二卖/三卖)
- 用户提到"缠中说禅"、"缠师"、"缠论买点"等关键词
- User asks about Chan Theory-related analysis: "AAPL.US Chan Theory analysis", "Which buy point is 700.HK at now", "Help me check TSLA's Zhongshu"
- Identify fractals (top/bottom fractals), Bi (upward/downward Bi), Segment structures
- Determine the current type of buy/sell points (Buy 1/Buy 2/Buy 3/Sell 1/Sell 2/Sell 3)
- User mentions keywords like "Chan Zhong Shuo Chan", "Chan Master", "Chan Theory buy points"
Workflow
Workflow
- 从用户输入提取标的代码,标准化为 格式。
<CODE>.<MARKET> - 获取日线 OHLCV 数据(300 根 K 线):
bash
longbridge kline <SYMBOL> --period day --count 300 --format json - 将 JSON 数据转换为 czsc 所需的 列表格式(字段:
RawBar,dt,open,high,low,close)。vol - 使用 czsc 库解析缠论结构:
python
import czsc from czsc import CZSC # bars: list of czsc.RawBar c = CZSC(bars) # 分型: c.fx_list # 笔: c.bi_list # 线段: c.seg_list (if available) # 中枢: c.zs_list (if available) - 读取最近的笔序列和中枢,匹配买卖点逻辑:
- 一买:下降笔触及中枢下沿后出现底分型
- 二买:中枢震荡后上升笔回撤不破中枢低点出现底分型
- 三买:突破中枢上沿后回调不破中枢高点出现底分型
- 卖点逻辑对称(一卖/二卖/三卖)
- 输出分析结论:当前所处买卖点、最近中枢区间、最近分型位置。
若环境未安装 czsc,提示用户先运行,然后重试。 若不确定 CLI 参数,先运行pip install czsc查看最新参数。longbridge kline --help
- Extract the symbol code from user input and standardize it to format.
<CODE>.<MARKET> - Obtain daily OHLCV data (300 K-lines):
bash
longbridge kline <SYMBOL> --period day --count 300 --format json - Convert JSON data to the list format required by czsc (fields:
RawBar,dt,open,high,low,close).vol - Parse Chan Theory structures using the czsc library:
python
import czsc from czsc import CZSC # bars: list of czsc.RawBar c = CZSC(bars) # Fractals: c.fx_list # Bi: c.bi_list # Segments: c.seg_list (if available) # Zhongshu: c.zs_list (if available) - Read the latest Bi sequence and Zhongshu, match the buy/sell point logic:
- Buy 1: A bottom fractal appears after a downward Bi touches the lower edge of Zhongshu
- Buy 2: A bottom fractal appears after an upward Bi retraces without breaking the low of Zhongshu during Zhongshu oscillation
- Buy 3: A bottom fractal appears after breaking the upper edge of Zhongshu and pulling back without breaking the high of Zhongshu
- Sell point logic is symmetric (Sell 1/Sell 2/Sell 3)
- Output analysis conclusions: current buy/sell point, latest Zhongshu range, latest fractal position.
If czsc is not installed in the environment, prompt the user to runfirst and then retry. If unsure about CLI parameters, runpip install czscfirst to check the latest parameters.longbridge kline --help
CLI
CLI
bash
undefinedbash
undefined获取日线数据(主要数据源)
Obtain daily data (main data source)
longbridge kline AAPL.US --period day --count 300 --format json
longbridge kline AAPL.US --period day --count 300 --format json
若需更短周期辅助判断(可选)
If shorter periods are needed for auxiliary judgment (optional)
longbridge kline 700.HK --period week --count 100 --format json
undefinedlongbridge kline 700.HK --period week --count 100 --format json
undefinedOutput
Output
以自然语言呈现,包含:
- 当前买卖点:一买 / 二买 / 三买 / 一卖 / 二卖 / 三卖(或"暂无明确信号")
- 最近中枢区间:[中枢低点, 中枢高点](含价格)
- 最近分型:类型(顶/底)+ 价格 + 日期
- 最近笔:方向(上升/下降)+ 起止价格
- 数据来源:Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券
Presented in natural language, including:
- Current buy/sell point: Buy 1 / Buy 2 / Buy 3 / Sell 1 / Sell 2 / Sell 3 (or "No clear signal yet")
- Latest Zhongshu range: [Zhongshu low, Zhongshu high] (including prices)
- Latest fractal: Type (top/bottom) + price + date
- Latest Bi: Direction (upward/downward) + start/end prices
- Data source: Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券
Error handling
Error handling
| 情形 | 简体回复 | 繁體回覆 / English |
|---|---|---|
| 尝试 MCP fallback;否则请安装 longbridge-terminal | 嘗試 MCP fallback;否則請安裝 longbridge-terminal / Try MCP fallback; otherwise install longbridge-terminal |
stderr 含 | 请运行 | 請運行 |
| Python 环境缺少 czsc | 请运行 | 請運行 |
| czsc 版本不兼容 | 请运行 | 請運行 |
| 其他 stderr | 原样返回错误,不静默重试 | 原樣返回錯誤,不靜默重試 / Surface verbatim, never retry silently |
| Scenario | Simplified Chinese Reply | Traditional Chinese / English |
|---|---|---|
| Try MCP fallback; otherwise please install longbridge-terminal | 嘗試 MCP fallback;否則請安裝 longbridge-terminal / Try MCP fallback; otherwise install longbridge-terminal |
stderr contains | Please run | 請運行 |
| Python environment lacks czsc | Please run | 請運行 |
| czsc version incompatible | Please run | 請運行 |
| Other stderr | Return the error as is, do not retry silently | 原樣返回錯誤,不靜默重試 / Surface verbatim, never retry silently |
MCP fallback
MCP fallback
若 CLI 不可用且已配置 MCP:
| CLI 命令 | MCP 工具 |
|---|---|
| |
If CLI is unavailable and MCP is configured:
| CLI command | MCP tool |
|---|---|
| |
Related skills
Related skills
| 用户询问 | 路由至 |
|---|---|
| 实时股价/行情 | |
| K线图/历史价格 | |
| 艾略特波浪 | |
| 谐波形态 | |
| 聪明钱/SMC | |
| 资金流向 | |
| User inquiry | Route to |
|---|---|
| Real-time stock price/market quotes | |
| K-line chart/historical prices | |
| Elliott Wave | |
| Harmonic Patterns | |
| Smart Money/SMC | |
| Capital Flow | |
File layout
File layout
longbridge-chanlun/
└── SKILL.mdlongbridge-chanlun/
└── SKILL.md