longbridge-harmonic

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

longbridge-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

  1. 提取标的代码,标准化为
    <CODE>.<MARKET>
    格式。
  2. 获取日线 OHLCV 数据(200 根 K 线):
    bash
    longbridge kline <SYMBOL> --period day --count 200 --format json
  3. Zigzag 识别摆动点(threshold 默认 5%),取最近 5 个有效摆动点作为 X-A-B-C-D 候选。
  4. 计算各段斐波那契比率
    • AB/XA
      :AB 相对于 XA 的回撤比
    • BC/AB
      :BC 相对于 AB 的回撤比
    • CD/BC
      :CD 相对于 BC 的延伸比
    • AD/XA
      :AD 相对于 XA 的整体比(PRZ 核心)
  5. 与四种标准谐波容差(±5%)比较
    形态AB/XABC/ABCD/BCAD/XA
    Gartley0.6180.382–0.8861.272–1.6180.786
    Bat0.382–0.5000.382–0.8861.618–2.6180.886
    Butterfly0.7860.382–0.8861.618–2.6181.272–1.618
    Crab0.382–0.6180.382–0.8862.618–3.6181.618
  6. 匹配成功则计算 PRZ 区间(D 点目标范围),判断看多(看涨 XABCD)或看空(看跌 XABCD)方向。
  7. 输出形态名称、PRZ 范围、方向、止损位。
若不确定 CLI 参数,先运行
longbridge kline --help
查看最新参数。
  1. Extract the symbol code and standardize it to the
    <CODE>.<MARKET>
    format.
  2. Obtain daily OHLCV data (200 candlesticks):
    bash
    longbridge kline <SYMBOL> --period day --count 200 --format json
  3. Zigzag swing point identification (default threshold is 5%), take the latest 5 valid swing points as candidates for X-A-B-C-D.
  4. Calculate Fibonacci ratios for each segment:
    • AB/XA
      : Retracement ratio of AB relative to XA
    • BC/AB
      : Retracement ratio of BC relative to AB
    • CD/BC
      : Extension ratio of CD relative to BC
    • AD/XA
      : Overall ratio of AD relative to XA (core of PRZ)
  5. Compare with the tolerance ranges (±5%) of four standard harmonic patterns:
    PatternAB/XABC/ABCD/BCAD/XA
    Gartley0.6180.382–0.8861.272–1.6180.786
    Bat0.382–0.5000.382–0.8861.618–2.6180.886
    Butterfly0.7860.382–0.8861.618–2.6181.272–1.618
    Crab0.382–0.6180.382–0.8862.618–3.6181.618
  6. 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.
  7. Output the pattern name, PRZ range, direction, and stop-loss level.
If you are unsure about CLI parameters, run
longbridge kline --help
first to check the latest parameters.

CLI

CLI

bash
undefined
bash
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
undefined
longbridge kline TSLA.US --period 60m --count 200 --format json
undefined

Output

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 回复
command not found: longbridge
尝试 MCP fallback;否则告知用户安装 longbridge-terminal
stderr 含
not logged in
告知用户运行
longbridge auth login
Zigzag 摆动点不足(少于 5 个)建议增大
--count
或切换周线
--period week
无法匹配任何谐波形态告知"当前未检测到满足标准谐波比率的 XABCD 结构"
其他 stderr原样透传,不静默重试
ScenarioLLM Response
command not found: longbridge
Try MCP fallback; otherwise, inform the user to install longbridge-terminal
stderr contains
not logged in
Inform the user to run
longbridge auth login
Insufficient Zigzag swing points (fewer than 5)Suggest increasing
--count
or switching to weekly candlesticks with
--period week
No harmonic pattern can be matchedInform "No XABCD structure meeting the standard harmonic ratios is detected currently"
Other stderrPass through as-is, do not retry silently

MCP fallback

MCP fallback

若 CLI 不可用且已配置 MCP:
CLI 命令MCP 工具
longbridge kline
mcp__longbridge__history_candlesticks
If CLI is unavailable and MCP is configured:
CLI CommandMCP Tool
longbridge kline
mcp__longbridge__history_candlesticks

Related skills

Related skills

用户询问路由至
实时股价/行情
longbridge-quote
K线图/历史价格
longbridge-kline
缠论分型/买卖点
longbridge-chanlun
艾略特波浪
longbridge-elliott
聪明钱/SMC
longbridge-smc
资金流向
longbridge-capital-flow
User InquiryRoute to
Real-time stock price/market quotes
longbridge-quote
Candlestick charts/historical prices
longbridge-kline
Chanlun patterns/buy-sell points
longbridge-chanlun
Elliott Wave
longbridge-elliott
Smart Money Concepts (SMC)
longbridge-smc
Capital flow
longbridge-capital-flow

File layout

File layout

longbridge-harmonic/
└── SKILL.md
longbridge-harmonic/
└── SKILL.md