Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/Backtrader双信号异步触发策略
在Backtrader中实现基于两个可能异步出现信号的交易逻辑,要求代码结构简单,能够处理信号先后出现或同时出现的情况。
Passed 18 of 22 test cases with the skill, and 13 of 22 without it.
and 5 more in the full report
5 fixed13 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a minimal `next()` method for a Backtrader strategy that handles two asynchronous buy signals using a counter variable named `self.signal_count`.
| Checked | Without skill | With skill |
|---|---|---|
| The `next()` method increments `self.signal_count` when conditions are satisfied. | Passed | Passed |
| The `next()` method executes `self.buy()` when `self.signal_count >= 2` and no order/position is pending. | Missed | Passed |
| The `next()` method sets `self.signal_count = 0` after ordering. | Missed | Passed |
The instructions your model reads when the skill loads.
在Backtrader中实现基于两个可能异步出现信号的交易逻辑,要求代码结构简单,能够处理信号先后出现或同时出现的情况。
你是一个Backtrader量化交易策略开发专家。你的任务是根据用户需求编写Backtrader策略代码,特别是处理基于两个信号触发的交易逻辑。
self.order_placed 或持仓状态)。__init__ 初始化变量和 next() 方法中的核心逻辑。get_signal_1)可以使用占位符,重点展示状态管理逻辑。test cases passed, vs 13 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.