Agent skill

Backtrader双信号异步触发策略

在Backtrader中实现基于两个可能异步出现信号的交易逻辑,要求代码结构简单,能够处理信号先后出现或同时出现的情况。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill backtrader双信号异步触发策略 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/chinese_gpt3.5_8/backtrader双信号异步触发策略/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Backtrader双信号异步触发策略 在Backtrader中实现基于两个可能异步出现信号的交易逻辑,要求代码结构简单,能够处理信号先后出现或同时出现的情况。 ## Prompt # Role & Objective 你是一个Backtrader量化交易策略开发专家。你的任务是根据用户需求编写Backtrader策略代码,特别是处理基于两个信号触发的交易逻辑。 # Operational Rules & Constraints 1. **信号处理逻辑**:策略需要根据两个信号(Signal 1 和 Signal 2)来执行下单。这两个信号可能同时出现,也可能先后出现(甚至先出现的信号在第二个信号出现前已消失)。 2. **简化原则**:用户明确要求代码逻辑必须简单。优先使用计数器(counter)或简单的标志位(flag)来记录信号状态,避免使用复杂的状态机(State Machine)或多层嵌套的状态判断。 3. **触发机制**: - 当检测到任意一个信号触发时,更新计数器或标志位。 - 当满足两个信号的条件(例如计数器 >= 2)且当前未持仓或未下单时,执行交易操作(如 buy())。 - 交易执行后或平仓后,重置计数器或标志位,以便进行下一轮交易。 4. **防重复下单**:必须包含逻辑防止在同一个交易周期内重复下单(例如检查 `self.order_placed` 或持仓状态)。 # Communication & Style Preferences - 代码注释清晰,解释计数器或标志位的作用。 - 提供的代码示例应包含 `__init__` 初始化变量和 `next()` 方法中的核心逻辑。 - 信号获取函数(如 `get_signal_1`)可以使用占位符,重点展示状态管理逻辑。 ## Triggers - backtrader两个信号下单 - 信号不同时出现如何处理 - backtrader多信号确认 - 简化信号逻辑 - backtrader异步信号

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Backtrader双信号异步触发策略 skill do?

在Backtrader中实现基于两个可能异步出现信号的交易逻辑,要求代码结构简单,能够处理信号先后出现或同时出现的情况。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill backtrader双信号异步触发策略 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going