Summary
为 rs_czsc 编写或重构 Rust 信号函数(bar/tas/cxt/pos)并接入事件驱动链路(`#[signal]` 自动注册、SignalConfig、Event/Position 匹配)的工作流。遇到“新增信号函数”“修改信号模板”“注册信号函数”“排查信号不触发”时使用。
zengbin93/czsc · Archived
为 rs_czsc 编写或重构 Rust 信号函数(bar/tas/cxt/pos)并接?
npx skills add zengbin93/czsc --skill czsc-write-signal-function
为 rs_czsc 编写或重构 Rust 信号函数(bar/tas/cxt/pos)并接入事件驱动链路(`#[signal]` 自动注册、SignalConfig、Event/Position 匹配)的工作流。遇到“新增信号函数”“修改信号模板”“注册信号函数”“排查信号不触发”时使用。
This repository is archived — consider an actively maintained alternative.
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Skill for converting an installed Firebase Extension (or extension source) into a standalone Cl…
30K installsShopify Functions allow developers to customize the backend logic that powers parts of Shopify.
9.7K installs>- Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABAS…
4.2K installsBuilds resilient, long-running, multi-step applications with AWS Lambda durable functions with …
4K installsDeploy an event-driven workflow that routes S3 uploads to either Lambda or Fargate via Step Fun…
3.4K installsDeploy serverless browser automation as cloud functions using Browserbase.
2.7K installsOther skills from zengbin93/czsc.
npx skills add zengbin93/czsc
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
master
Files included with this skill beyond the listing page.
SKILL.md
4,624 B
SUMMARY.md
328 B
用这个技能在 rs_czsc 中稳定完成信号函数开发:
Signal 7段格式SignalConfig 和测试验证是否能触发 Event -> Position先读:
references/event-driven-signal-pipeline.mdreferences/signal-function-patterns.md需要快速起草函数时,先运行:
scripts/newsignalstub.pyPosition)或策略状态吗?pos.rs 风格),用 #[signal(category = "trader", ...)] 自动注册。bar/tas/cxt 风格),用 #[signal(category = "kline", ...)] 自动注册。TaCache,优先走 update*cache。_cache 参数但不使用。Vec<Signal>,每个信号都保持 7 段格式。Vec。params)和默认值。k1/k2/k3 模板和 v1/v2/v3 语义。vec![] 或 其他 信号。fn(&CZSC, &ParamView, &mut TaCache) -> Vec<Signal>。fn(&dyn TraderState, &ParamView) -> Vec<Signal>。getusizeparam / getstrparam。- 标题行:/// <func_name>:<一句话功能> - /// - /// 参数模板:\"..."\` - /// - /// 信号逻辑: - /// 1. ... - /// 2. ... - /// 3. ... - /// - /// 信号列表示例: - /// - Signal('...') - /// - Signal('...') - /// - /// 参数说明: - /// - <param>: <含义与默认值> - /// - <param>: <含义与默认值> - 与 Python 或历史版本对齐时,必须补一行:/// 对齐说明:...`
format! 拼出完整字符串:k1k2k3v1v2v3score。Signal::from_str(...) 或 parse::<Signal>() 做最终构造。#[signal(...)],由 inventory 自动收集。V 与 v 大小写风格)。#[signal(...)] 中给出 template,确保 SignalConfig 反解析和人类阅读一致。SignalConfig { name, freq: Some(...), params } 在 CzscSignals::update_signals 中执行。SignalConfig { name, freq: None, params } 在 CzscTrader::update 的 Trader 信号分支执行。- 函数在样本上可运行,不 panic。 - 输出信号可被 Signal 正常解析(7段、score 0~100)。 - 注册后能被 SignalConfig.name 命中。 - 若用于交易事件,Event.matches_signals* 能按预期触发。 - 注释完整:他人仅看注释可理解参数、边界、输出语义和关键判定。
signalcomparetests、trader_tests 或新增针对性测试。- 每个新/改信号函数都包含 参数模板/信号逻辑/信号列表示例/参数说明 四段。 - 信号列表示例 至少 2 条,且与当前函数输出字段一致(k1k2k3v1v2v3score)。
Signal::from_str 失败。TaCache 重复全量计算重指标。references/event-driven-signal-pipeline.mdreferences/signal-function-patterns.mdscripts/newsignalstub.py