longbridge-harmonic
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-harmonic
longbridge-harmonic
谐波形态信号引擎:基于斐波那契几何关系识别 XABCD 五点结构,支持 Gartley、Bat(蝙蝠)、Butterfly(蝴蝶)、Crab(螃蟹)四种经典形态,在潜在反转区(PRZ)生成多/空方向交易信号。
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
Harmonic Pattern Signal Engine: Identifies the XABCD five-point structure based on Fibonacci geometric relationships, supports four classic patterns including Gartley, Bat, Butterfly, and Crab, and generates long/short direction trading signals in the Potential Reversal Zone (PRZ).
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
When to use
When to use
- 用户询问谐波形态:"AAPL 有没有 Gartley 形态"、"700.HK 蝙蝠形态分析"、"TSLA PRZ 在哪里"
- 检测 XABCD 结构是否满足特定谐波形态的斐波那契比率
- 判断潜在反转区(PRZ)位置,辅助入场决策
- 用户提到"蝴蝶形态"、"螃蟹形态"、"XABCD"等关键词
- When users inquire about harmonic patterns: "AAPL 有没有 Gartley 形态", "700.HK 蝙蝠形态分析", "TSLA PRZ 在哪里"
- Detect whether the XABCD structure meets the Fibonacci ratios of specific harmonic patterns
- Determine the position of the Potential Reversal Zone (PRZ) to assist entry decisions
- When users mention keywords such as "蝴蝶形态", "螃蟹形态", "XABCD"
Workflow
Workflow
-
提取标的代码,标准化为格式。
<CODE>.<MARKET> -
获取日线 OHLCV 数据(200 根 K 线):bash
longbridge kline <SYMBOL> --period day --count 200 --format json -
Zigzag 识别摆动点(threshold 默认 5%),取最近 5 个有效摆动点作为 X-A-B-C-D 候选。
-
计算各段斐波那契比率:
- :AB 相对于 XA 的回撤比
AB/XA - :BC 相对于 AB 的回撤比
BC/AB - :CD 相对于 BC 的延伸比
CD/BC - :AD 相对于 XA 的整体比(PRZ 核心)
AD/XA
-
与四种标准谐波容差(±5%)比较:
形态 AB/XA BC/AB CD/BC AD/XA Gartley 0.618 0.382–0.886 1.272–1.618 0.786 Bat 0.382–0.500 0.382–0.886 1.618–2.618 0.886 Butterfly 0.786 0.382–0.886 1.618–2.618 1.272–1.618 Crab 0.382–0.618 0.382–0.886 2.618–3.618 1.618 -
匹配成功则计算 PRZ 区间(D 点目标范围),判断看多(看涨 XABCD)或看空(看跌 XABCD)方向。
-
输出形态名称、PRZ 范围、方向、止损位。
若不确定 CLI 参数,先运行查看最新参数。longbridge kline --help
-
Extract the symbol code and standardize it to theformat.
<CODE>.<MARKET> -
Obtain daily OHLCV data (200 candlesticks):bash
longbridge kline <SYMBOL> --period day --count 200 --format json -
Zigzag swing point identification (default threshold is 5%), take the latest 5 valid swing points as candidates for X-A-B-C-D.
-
Calculate Fibonacci ratios for each segment:
- : Retracement ratio of AB relative to XA
AB/XA - : Retracement ratio of BC relative to AB
BC/AB - : Extension ratio of CD relative to BC
CD/BC - : Overall ratio of AD relative to XA (core of PRZ)
AD/XA
-
Compare with the tolerance ranges (±5%) of four standard harmonic patterns:
Pattern AB/XA BC/AB CD/BC AD/XA Gartley 0.618 0.382–0.886 1.272–1.618 0.786 Bat 0.382–0.500 0.382–0.886 1.618–2.618 0.886 Butterfly 0.786 0.382–0.886 1.618–2.618 1.272–1.618 Crab 0.382–0.618 0.382–0.886 2.618–3.618 1.618 -
If the match is successful, calculate the PRZ range (target range for point D), and determine the bullish (bullish XABCD) or bearish (bearish XABCD) direction.
-
Output the pattern name, PRZ range, direction, and stop-loss level.
If you are unsure about CLI parameters, runfirst to check the latest parameters.longbridge kline --help
CLI
CLI
bash
undefinedbash
undefined日线数据(主要数据源)
Daily candlestick data (primary data source)
longbridge kline AAPL.US --period day --count 200 --format json
longbridge kline AAPL.US --period day --count 200 --format json
4 小时线(辅助确认短周期形态,可选)
4-hour candlestick data (auxiliary confirmation for short-term patterns, optional)
longbridge kline TSLA.US --period 60m --count 200 --format json
undefinedlongbridge kline TSLA.US --period 60m --count 200 --format json
undefinedOutput
Output
以自然语言呈现,包含:
- 识别到的形态:如 "Bullish Gartley(看涨 Gartley)"、"Bearish Bat(看跌蝙蝠)"
- XABCD 各点价格和日期
- PRZ 区间:[PRZ 低点, PRZ 高点](D 点潜在落点范围)
- 交易方向:看多(Bullish)/ 看空(Bearish)
- 止损位:突破 X 点则形态失效
- 斐波那契比率符合度(各比率实际值 vs 标准值)
- 数据来源:Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券
Presented in natural language, including:
- Identified pattern: e.g., "Bullish Gartley", "Bearish Bat"
- Price and date of each XABCD point
- PRZ range: [PRZ low, PRZ high] (potential landing range for point D)
- Trading direction: Bullish / Bearish
- Stop-loss level: The pattern becomes invalid if point X is breached
- Fibonacci ratio compliance (actual values vs standard values for each ratio)
- Data source: Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券
Error handling
Error handling
| 情形 | LLM 回复 |
|---|---|
| 尝试 MCP fallback;否则告知用户安装 longbridge-terminal |
stderr 含 | 告知用户运行 |
| Zigzag 摆动点不足(少于 5 个) | 建议增大 |
| 无法匹配任何谐波形态 | 告知"当前未检测到满足标准谐波比率的 XABCD 结构" |
| 其他 stderr | 原样透传,不静默重试 |
| Scenario | LLM Response |
|---|---|
| Try MCP fallback; otherwise, inform the user to install longbridge-terminal |
stderr contains | Inform the user to run |
| Insufficient Zigzag swing points (fewer than 5) | Suggest increasing |
| No harmonic pattern can be matched | Inform "No XABCD structure meeting the standard harmonic ratios is detected currently" |
| Other stderr | Pass through as-is, do not 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 | |
| Candlestick charts/historical prices | |
| Chanlun patterns/buy-sell points | |
| Elliott Wave | |
| Smart Money Concepts (SMC) | |
| Capital flow | |
File layout
File layout
longbridge-harmonic/
└── SKILL.mdlongbridge-harmonic/
└── SKILL.md