dragon-relay

A short-term leader-form relay assistant that selects top relay candidate stocks from a watchlist based on momentum-shaped patterns. Uses a four-dimension scoring system (D1 trend strength, D2 acceleration, D3 volume dynamics, D4 high-price elasticity) to rank each stock on a 106-point scale, identifying accelerated volume and multi-period resonance short-term relay patterns. Intended for users who need help picking short-term leader relay stocks. Trigger terms include: shape momentum, pattern selection, leader pattern, 4-dimension scoring, momentum ranking, pattern relay, relay stock selection.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "dragon-relay" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-4e5445bfecce2e4b9ecd8a7a737c019e1d2c32998e8fd707d31c868ca6575e06. Verify the upstream source and version against https://skillhub.cn/skills/user_8b05e1bd/dragon-relay before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A short-term leader-form relay assistant that selects top relay candidate stocks from a watchlist based on momentum-shaped patterns. Uses a four-dimension scoring system (D1 trend strength, D2 acceleration, D3 volume dynamics, D4 high-price elasticity) to rank each stock on a 106-point scale, identifying accelerated volume and multi-period resonance short-term relay patterns. Intended for users who need help picking short-term leader relay stocks. Trigger terms include: shape momentum, pattern selection, leader pattern, 4-dimension scoring, momentum ranking, pattern relay, relay stock selection.

0 Downloads

Introduction source: third_party · user_8b05e1bd · 1.0.1 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: dragon-pattern-relay
description: "我是你的短线龙头形态接力助手,帮你从自选股池中筛选出形态动量最优的接力候选标的。我通过四维度评分体系(D1趋势强度+D2加速度+D3量能动态+D4高价弹性)对每只股票进行106分制量化排名,精准捕捉加速放量、多周期共振的短线接力形态。不只看涨了多少,更看加速是否持续、量能是否确认、高价弹性是否支撑。适合做短线龙头接力但不知道该选哪只的你。触发词:形态动量、形态选股、龙头形态、4维度评分、动量排行、形态接力、接力选股。"
agent_created: true

龙头形态接力

我是你的短线龙头形态接力助手,帮你从自选股池中筛选出形态动量最优的接力候选标的。

我通过四维度评分体系(D1趋势强度+D2加速度+D3量能动态+D4高价弹性)对每只股票进行106分制量化排名, 精准捕捉加速放量、多周期共振的短线接力形态。

不只看涨了多少,更看加速是否持续、量能是否确认、高价弹性是否支撑。 适合做短线龙头接力但不知道该选哪只的你。

pytdx直连通达信行情服务器,读取自选股板块文件, 对每只股票获取20日日线K线,进行形态动量排名, 生成可视化报告(HTML + A4横向PDF)。

触发条件

用户说出以下任意关键词时触发:

  • 「形态动量」
  • 「形态选股」
  • 「龙头形态」
  • 「4维度评分」
  • 「动量排行」
  • 「形态接力」
  • 「接力选股」
  • 「帮我做形态评分」
  • 「4维度打分」

安装依赖

首次运行前,AI需执行:

pip install pytdx playwright
python -m playwright install chromium

playwright chromium 约150MB。若下载超时,PDF功能自动降级跳过,HTML报告照常生成。

运行前提

  1. 通达信已安装:本地磁盘有 T0002 目录(含 blocknew 子目录)
  2. 自选股已建立:通达信中有 .blk 自选股板块文件(默认找 QLB.blk,或 blocknew 目录下任意 blk 文件)
  3. 网络可达通达信服务器:脚本直连 124.71.9.153:7709

执行方式(零手动配置)

python scripts/pattern_momentum_v4.py [工作目录]

脚本启动时会自动完成:

  1. 安装 pytdx(如未安装)
  2. 探测通达信 T0002 目录(扫描 C/D/E 盘常见路径)
  3. 找到 blocknew/QLB.blk 自选股文件
  4. 推断 PDF 归档目录(用户桌面/龙虾形态动量排行)

只有一种情况需要手动指定——通达信装在非常规路径时:

set TDX_BASE=F:/我的通达信/T0002
python scripts/pattern_momentum_v4.py

工作目录参数可选,默认为当前目录。

执行流程

脚本自动完成五个阶段:

阶段1:读取自选股

解析 .blk 文件,格式为 市场标志位(0/1)+六位代码,0=深市,1=沪市。

阶段2:获取股票名称

  • 深市股票通过 pytdx get_security_list 翻页获取名称
  • 沪市股票通过新浪财经API批量获取名称(pytdx沪市名称返回异常的已知问题)

阶段3:K线查询 + 4维度评分

对每只股票,通过 pytdx get_security_bars(4, market, code, 0, 20) 查询20日日线K线。

关键参数:category=4(日线),不是category=0(5分钟线)。错误的category会导致数据完全错误。

计算3日/5日/10日涨幅、加速度、量能比,代入4维度评分函数得出106分制总分。 详细评分逻辑见 references/scoring.md。

阶段4:生成HTML报告

暗色主题可视化报告,包含:

  • 统计摘要(有效股票数/最高分/平均分/各等级分布)
  • 4维度柱状图(D1趋势/D2加速/D3量能/D4弹性)
  • 水晶渐变评分徽章(烈焰/黄金/琥珀/青铜/钢铁)
  • 3日/5日/10日涨跌幅 + 加速度 + 量比(红涨绿跌,中国股市惯例)

阶段5:生成PDF

通过 Playwright 将HTML渲染为A4横向PDF,自动归档到桌面目录。 chromium 未安装时跳过,只生成HTML。

4维度评分体系

维度 满分 考察内容
D1 趋势强度 30+3 3日/5日/10日涨幅各10分,全正额外+3
D2 加速度 30 acc=g3-g5,>=+5%满分,<=-5%零分
D3 量能动态 25+3 近3日均量/前5日均量>=2.0满分,量价齐升+3
D4 高价弹性 15 >=50元满分,<5元仅1分

总分水晶徽章:>=80 烈焰 / >=60 黄金 / >=45 琥珀 / >=35 青铜 / <35 钢铁

完整评分说明见:references/scoring.md

接力选股逻辑

4维度评分体系专为短线龙头接力场景设计:

  • D2加速度高分 = 个股正在加速启动,是接力切入的关键信号
  • D3量能高分 = 资金正在涌入,放量确认形态有效
  • D1趋势全正 = 多周期共振,趋势稳健非一日游
  • D4高价弹性 = 机构偏好标的,流动性好易于进出

接力策略建议:

  • 总分>=80(烈焰):多维度共振,优先关注接力机会
  • D2满分(30) + D3高分(>=20):加速放量形态,短线接力首选
  • D1全正加分 + D2高分:趋势加速双确认,中继形态可靠

输出文件

文件 位置 用途
pattern_momentum_v4.json 工作目录 评分数据(JSON格式,含全部维度明细)
pattern_momentum_v4.html 工作目录 HTML报告(浏览器直接打开,Ctrl+P可导出PDF)
龙头形态接力-YYYY-MM-DD.pdf 工作目录 + 归档目录 PDF报告(A4横向,适合打印和存档)

数据源架构

pytdx (通达信行情服务器)              本地通达信 (T0002目录)
├── get_security_bars(4,...) → 日线K线  └── blocknew/*.blk → 自选股列表
├── get_security_list → 深市股票名称
新浪财经API → 沪市股票名称

已知 pytdx 问题与修复

问题 原因 修复方案
沪市股票名称全部缺失 pytdx get_security_list(1,0) 首页返回空列表 沪市名称改用新浪财经API批量获取
K线数据异常/涨幅极小 category=0返回5分钟线而非日线 固定使用 category=4(日线)
Python 3.12+ f-string语法错误 不支持f-string内反斜杠转义引号 提前将表达式赋值给变量再插入f-string

与其他技能的关系

技能 定位 评分体系 数据来源
股票热点动量分析师 热点板块命中选股 旧版四维(5d/10d/20d/60d涨幅) 板块成分股∩自选股
龙头接力 板块内部龙头切换 五维接力评分 TOP10板块全部成分股
龙头形态接力 自选股形态动量排名 4维度(D1/D2/D3/D4) 自选股全量评分

三者互补:热点动量看板块命中,龙头接力看板块内部切换,龙头形态接力看自选股形态质量。

注意事项

  • 运行时间约10-30秒(取决于自选股数量),262只股票约15秒
  • 每日盘后运行一次即可,结果按日期自动归档便于对比
  • 中国股市惯例:红色=涨,绿色=跌(与美股相反)
  • 脚本请求间隔 0.03 秒,避免对行情服务器压力过大

Current listing version

1.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 面向股票短线交易者,提供量化形态评分与可视化报告
  • 解决具体选股痛点,具备明确实用价值
Trigger Precision95/100

Highlights

  • 触发词列表完整,覆盖多种变体,边界清晰
Structure and Standards85/100

Highlights

  • Phase/步骤清晰,含端到端示例,frontmatter完整
Execution Reliability80/100

Highlights

  • 工具来源明确,参数正确,覆盖主要异常并提供降级方案
Evidence Verifiability (mean of the first four)84/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 39

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.