longbridge-chanlun

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

longbridge-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,使用前需手动安装:
bash
pip 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 required
This skill depends on the third-party Python library czsc, which needs to be installed manually before use:
bash
pip install czsc
If 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

  1. 从用户输入提取标的代码,标准化为
    <CODE>.<MARKET>
    格式。
  2. 获取日线 OHLCV 数据(300 根 K 线):
    bash
    longbridge kline <SYMBOL> --period day --count 300 --format json
  3. 将 JSON 数据转换为 czsc 所需的
    RawBar
    列表格式(字段:
    dt
    ,
    open
    ,
    high
    ,
    low
    ,
    close
    ,
    vol
    )。
  4. 使用 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)
  5. 读取最近的笔序列和中枢,匹配买卖点逻辑:
    • 一买:下降笔触及中枢下沿后出现底分型
    • 二买:中枢震荡后上升笔回撤不破中枢低点出现底分型
    • 三买:突破中枢上沿后回调不破中枢高点出现底分型
    • 卖点逻辑对称(一卖/二卖/三卖)
  6. 输出分析结论:当前所处买卖点、最近中枢区间、最近分型位置。
若环境未安装 czsc,提示用户先运行
pip install czsc
,然后重试。 若不确定 CLI 参数,先运行
longbridge kline --help
查看最新参数。
  1. Extract the symbol code from user input and standardize it to
    <CODE>.<MARKET>
    format.
  2. Obtain daily OHLCV data (300 K-lines):
    bash
    longbridge kline <SYMBOL> --period day --count 300 --format json
  3. Convert JSON data to the
    RawBar
    list format required by czsc (fields:
    dt
    ,
    open
    ,
    high
    ,
    low
    ,
    close
    ,
    vol
    ).
  4. 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)
  5. 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)
  6. 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 run
pip install czsc
first and then retry. If unsure about CLI parameters, run
longbridge kline --help
first to check the latest parameters.

CLI

CLI

bash
undefined
bash
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
undefined
longbridge kline 700.HK --period week --count 100 --format json
undefined

Output

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
command not found: longbridge
尝试 MCP fallback;否则请安装 longbridge-terminal嘗試 MCP fallback;否則請安裝 longbridge-terminal / Try MCP fallback; otherwise install longbridge-terminal
stderr 含
not logged in
请运行
longbridge auth login
請運行
longbridge auth login
/ Run
longbridge auth login
Python 环境缺少 czsc请运行
pip install czsc
后重试
請運行
pip install czsc
後重試 / Run
pip install czsc
then retry
czsc 版本不兼容请运行
pip install --upgrade czsc
請運行
pip install --upgrade czsc
/ Run
pip install --upgrade czsc
其他 stderr原样返回错误,不静默重试原樣返回錯誤,不靜默重試 / Surface verbatim, never retry silently
ScenarioSimplified Chinese ReplyTraditional Chinese / English
command not found: longbridge
Try MCP fallback; otherwise please install longbridge-terminal嘗試 MCP fallback;否則請安裝 longbridge-terminal / Try MCP fallback; otherwise install longbridge-terminal
stderr contains
not logged in
Please run
longbridge auth login
請運行
longbridge auth login
/ Run
longbridge auth login
Python environment lacks czscPlease run
pip install czsc
and try again
請運行
pip install czsc
後重試 / Run
pip install czsc
then retry
czsc version incompatiblePlease run
pip install --upgrade czsc
請運行
pip install --upgrade czsc
/ Run
pip install --upgrade czsc
Other stderrReturn the error as is, do not retry silently原樣返回錯誤,不靜默重試 / Surface verbatim, never 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-elliott
谐波形态
longbridge-harmonic
聪明钱/SMC
longbridge-smc
资金流向
longbridge-capital-flow
User inquiryRoute to
Real-time stock price/market quotes
longbridge-quote
K-line chart/historical prices
longbridge-kline
Elliott Wave
longbridge-elliott
Harmonic Patterns
longbridge-harmonic
Smart Money/SMC
longbridge-smc
Capital Flow
longbridge-capital-flow

File layout

File layout

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