wolf-strategy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWOLF v6 — Autonomous Multi-Strategy Trading
WOLF v6 — 自动化多策略交易系统
The WOLF hunts for its human. It scans, enters, exits, and rotates positions autonomously — no permission needed. When criteria are met, it acts. Speed is edge.
Proven: +$1,500 realized, 25+ trades, 65% win rate, single session on $6.5k budget.
v6: Multi-strategy support. Each strategy has independent wallet, budget, slots, and DSL config. Same asset can be held in different strategies simultaneously (e.g., Strategy A LONG HYPE + Strategy B SHORT HYPE).
WOLF为人类猎手主动觅食:它会自动扫描标的、开仓、平仓、轮换仓位,无需人工授权。满足条件时就会立即执行,速度就是核心优势。
已验证效果: 单周期内预算6500美元,完成25+笔交易,胜率65%,已实现盈利1500美元。
v6新特性:多策略支持。 每个策略都有独立的钱包、预算、仓位槽位和DSL配置,同一资产可同时在不同策略中持有(例如策略A做多HYPE + 策略B做空HYPE)。
Multi-Strategy Architecture
多策略架构
Strategy Registry (wolf-strategies.json
)
wolf-strategies.json策略注册表 (wolf-strategies.json
)
wolf-strategies.jsonCentral config holding all strategies. Created/updated by .
wolf-setup.pywolf-strategies.json
├── strategies
│ ├── wolf-abc123 (Aggressive Momentum, 3 slots, 10x)
│ └── wolf-xyz789 (Conservative XYZ, 2 slots, 7x)
└── global (telegram, workspace)存储所有策略的核心配置,由创建和更新。
wolf-setup.pywolf-strategies.json
├── strategies
│ ├── wolf-abc123 (激进动量策略, 3个仓位槽, 10倍杠杆)
│ └── wolf-xyz789 (保守XYZ策略, 2个仓位槽, 7倍杠杆)
└── global (telegram配置, 工作空间配置)Per-Strategy State
单策略独立状态
Each strategy gets its own state directory:
state/
├── wolf-abc123/
│ ├── dsl-HYPE.json
│ └── dsl-SOL.json
└── wolf-xyz789/
├── dsl-HYPE.json # Same asset, different strategy, no collision
└── dsl-GOLD.json每个策略都有专属的状态存储目录:
state/
├── wolf-abc123/
│ ├── dsl-HYPE.json
│ └── dsl-SOL.json
└── wolf-xyz789/
├── dsl-HYPE.json # 同一资产,不同策略,无配置冲突
└── dsl-GOLD.jsonSignal Routing
信号路由规则
When a signal fires, it's routed to the best-fit strategy:
- Which strategies have empty slots?
- Does any strategy already hold this asset? (skip within strategy, allow cross-strategy)
- Which strategy's risk profile matches? (aggressive gets FIRST_JUMPs, conservative gets DEEP_CLIMBERs)
- Route to best-fit -> open on that wallet -> create DSL state in that strategy's dir
当信号触发时,会自动路由到最匹配的策略:
- 哪些策略还有空闲仓位槽?
- 有没有策略已经持有该资产?(同一策略内跳过,跨策略允许)
- 哪个策略的风险 profile 匹配?(激进策略承接FIRST_JUMP信号,保守策略承接DEEP_CLIMBER信号)
- 路由到最优匹配策略 → 在对应钱包开仓 → 在该策略的状态目录下创建DSL状态文件
Adding a Strategy
添加新策略
bash
python3 scripts/wolf-setup.py --wallet 0x... --strategy-id UUID --budget 2000 \
--chat-id 12345 --name "Conservative XYZ" --dsl-preset conservativeThis adds to the registry without disrupting running strategies. Disable with in the registry.
enabled: falsebash
python3 scripts/wolf-setup.py --wallet 0x... --strategy-id UUID --budget 2000 \
--chat-id 12345 --name "Conservative XYZ" --dsl-preset conservative该操作会将新策略添加到注册表,不会影响正在运行的策略。在注册表中设置即可停用对应策略。
enabled: falseEntry Philosophy — THE Most Important Section
开仓理念 — 最重要的核心规则
Enter before the peak, not at the top.
Leaderboard rank confirmation LAGS price. When an asset jumps from #31->#16 in one scan, the price is moving NOW. By the time it reaches #7 with clean history, the move is over. Speed is edge.
Core principle: 2 reasons at rank #25 with a big jump = ENTER. 4+ reasons at rank #5 = SKIP (already peaked).
在峰值之前进场,不要在顶部接盘。
排行榜排名确认滞后于价格变化:当一个资产在单次扫描中从31名跳到16名时,价格已经在上涨了。等它带着清晰的历史数据爬到第7名时,行情已经结束了,速度就是优势。
核心原则: 排名25位时出现大幅跳涨,同时满足2个开仓理由 → 进场。排名第5位时满足4个以上开仓理由 → 跳过(已经见顶)。
Quick Start
快速开始
- Ensure Senpi MCP is connected (should show
mcporter list)senpi - Create a custom strategy wallet: use via mcporter
strategy_create_custom_strategy - Fund the wallet via with your budget
strategy_top_up - Run setup:
python3 scripts/wolf-setup.py --wallet 0x... --strategy-id UUID --budget 6500 --chat-id 12345 - Create the 7 OpenClaw crons using templates from
references/cron-templates.md - The WOLF is hunting
To add a second strategy, run again with a different wallet/budget. It adds to the registry.
wolf-setup.py- 确保Senpi MCP已连接(运行应该能看到
mcporter list)senpi - 创建自定义策略钱包:通过mcporter调用
strategy_create_custom_strategy - 调用向钱包转入对应预算的资金
strategy_top_up - 运行初始化脚本:
python3 scripts/wolf-setup.py --wallet 0x... --strategy-id UUID --budget 6500 --chat-id 12345 - 使用中的模板创建7个OpenClaw cron任务
references/cron-templates.md - WOLF开始自动运行
如需添加第二个策略,使用不同的钱包/预算再次运行即可,新策略会自动添加到注册表。
wolf-setup.pyArchitecture — 7 Cron Jobs
架构 — 7个Cron任务
| # | Job | Interval | Script | Purpose |
|---|---|---|---|---|
| 1 | Emerging Movers | 90s | | Hunt FIRST_JUMP + IMMEDIATE_MOVER signals — primary entry trigger |
| 2 | DSL Combined | 3min | | Trailing stop exits for ALL open positions across ALL strategies |
| 3 | SM Flip Detector | 5min | | Cut positions where SM conviction collapses |
| 4 | Watchdog | 5min | | Per-strategy margin buffer, liq distances, rotation candidates |
| 5 | Portfolio Update | 15min | (agent-driven) | Per-strategy PnL reporting to user |
| 6 | Opportunity Scanner | 15min | | Deep-dive 4-pillar scoring with BTC macro, hourly trend, disqualifiers |
| 7 | Health Check | 10min | | Per-strategy orphan DSL detection, state validation |
v6 change: One set of crons for all strategies. Each script reads and iterates all enabled strategies internally.
wolf-strategies.jsonv6 change: Opportunity Scanner v6 replaces the old scanner with BTC macro context, hourly trend filter, hard disqualifiers, parallel candle fetches, and cross-scan momentum tracking.
| 序号 | 任务名称 | 运行间隔 | 脚本 | 用途 |
|---|---|---|---|---|
| 1 | 新兴标的扫描 | 90秒 | | 捕捉FIRST_JUMP + IMMEDIATE_MOVER信号 — 核心开仓触发器 |
| 2 | DSL统一运行 | 3分钟 | | 为所有策略的所有持仓执行追踪止损平仓 |
| 3 | SM反转检测 | 5分钟 | | 平掉SM共识崩塌的仓位 |
| 4 | 看门狗监控 | 5分钟 | | 单策略保证金缓冲监控、强平距离检测、仓位轮换候选筛选 |
| 5 | 投资组合更新 | 15分钟 | (Agent驱动) | 向用户发送单策略PnL报告 |
| 6 | 机会扫描 | 15分钟 | | 结合BTC宏观行情、小时级趋势、排除规则的4维度深度评分 |
| 7 | 健康检查 | 10分钟 | | 单策略孤立DSL检测、状态校验 |
v6改动: 所有策略共用一套cron任务,每个脚本会读取并内部遍历所有已启用的策略。
wolf-strategies.jsonv6改动: v6机会扫描器替换了旧版扫描器,新增BTC宏观行情上下文、小时级趋势过滤、硬性排除规则、并行K线获取、跨扫描动量跟踪能力。
Model Selection Per Cron
每个Cron的模型选择
Configure these tiers in OpenClaw per-cron settings. Tier 1 = fast/cheap (e.g. claude-haiku-4-5, gpt-4o-mini, gemini-flash). Tier 2 = capable (e.g. anthropic/claude-sonnet-4-20250514, opus, gpt-4o, gemini-pro).
| Cron | Model Tier | Reason |
|---|---|---|
| Emerging Movers | Tier 2 (capable) | Multi-strategy routing judgment, entry decisions |
| Opportunity Scanner | Tier 2 (capable) | Complex 4-pillar analysis, conflict resolution |
| DSL Combined | Tier 1 (fast/cheap) | Binary: |
| SM Flip Detector | Tier 1 (fast/cheap) | Binary: conviction≥4 + 100 traders → close |
| Watchdog | Tier 1 (fast/cheap) | Threshold checks → alert |
| Portfolio Update | Tier 1 (fast/cheap) | Text formatting, no decisions |
| Health Check | Tier 1 (fast/cheap) | Rule-based file repair |
在OpenClaw的cron配置中设置以下模型层级:层级1 = 快速/低成本(例如claude-haiku-4-5、gpt-4o-mini、gemini-flash)。层级2 = 高能力(例如anthropic/claude-sonnet-4-20250514、opus、gpt-4o、gemini-pro)。
| Cron任务 | 模型层级 | 原因 |
|---|---|---|
| 新兴标的扫描 | 层级2(高能力) | 需要多策略路由判断、开仓决策 |
| 机会扫描 | 层级2(高能力) | 需要复杂的4维度分析、冲突解决 |
| DSL统一运行 | 层级1(快速/低成本) | 二元判断: |
| SM反转检测 | 层级1(快速/低成本) | 二元判断:共识≥4 + 100名交易者 → 平仓 |
| 看门狗监控 | 层级1(快速/低成本) | 阈值校验 → 告警 |
| 投资组合更新 | 层级1(快速/低成本) | 文本格式化,无需决策 |
| 健康检查 | 层级1(快速/低成本) | 基于规则的文件修复 |
Cron Setup
Cron设置
Critical: Crons are OpenClaw systemEvent crons, NOT senpi crons. Each cron fires a systemEvent that wakes the agent with a MANDATE.
Create each cron using the OpenClaw cron tool. The exact mandate text for each cron is in . Read that file, replace the placeholders (only and in v6), and create all 7 crons.
references/cron-templates.md{TELEGRAM}{SCRIPTS}v6 simplification: No more per-wallet/per-strategy placeholders in cron mandates. Scripts read all strategy info from the registry.
关键注意: Cron是OpenClaw systemEvent定时任务,不是senpi cron。每个cron触发systemEvent,携带执行指令唤醒Agent。
使用OpenClaw cron工具创建每个任务,每个cron的具体指令文本在****中。读取该文件,替换占位符(v6中仅需要替换和),创建全部7个cron。
references/cron-templates.md{TELEGRAM}{SCRIPTS}v6简化: Cron指令中不再有单钱包/单策略的占位符,脚本会从注册表读取所有策略信息。
Autonomy Rules
自动化运行规则
The WOLF operates autonomously by default. The agent does NOT ask permission to:
- Open a position when entry checklist passes
- Close a position when DSL triggers or conviction collapses
- Rotate out of weak positions into stronger signals
- Cut dead weight (SM conv 0, negative ROE, 30+ min)
The agent DOES notify the user (via Telegram) after every action.
WOLF默认全自动运行,Agent无需申请权限即可执行以下操作:
- 满足开仓检查清单时开仓
- DSL触发或共识崩塌时平仓
- 将弱势仓位轮换为更强的信号标的
- 清理无效仓位(SM共识0、负ROE、持仓超过30分钟)
Agent执行每一步操作后都会(通过Telegram)通知用户。
Entry Signals — Priority Order
开仓信号 — 优先级排序
1. FIRST_JUMP (Highest Priority)
1. FIRST_JUMP(最高优先级)
What: Asset jumps 10+ ranks from #25+ in ONE scan AND was not in previous scan's top 50 (or was at rank >= #30).
Action: Enter IMMEDIATELY. This is the money signal. Route to best-fit strategy with available slots.
Checklist:
- in scanner output
isFirstJump: true - 2+ reasons is enough (don't require 4+)
- vel > 0 is sufficient (velocity hasn't had time to build on a first jump)
- Max leverage >= 7x (check )
max-leverage.json - Slot available in target strategy (or rotation justified)
-
= 10 SM traders (crypto); for XYZ equities, ignore trader count
What to ignore:
- Erratic rank history — the scanner excludes the current jump from erratic checks.
- Low velocity — first jumps haven't had time to build velocity.
If CONTRIB_EXPLOSION accompanies it: Double confirmation. Even stronger entry.
定义: 资产在单次扫描中从25名以外跃升10名以上,且上一次扫描不在前50名(或排名≥30)。
操作: 立即开仓,这是核心盈利信号。路由到有空闲仓位的最匹配策略。
检查清单:
- 扫描输出中
isFirstJump: true - 满足2个以上开仓理由即可(不需要4个以上)
- vel > 0即满足要求(首次跳涨时 velocity 还没有足够时间累积)
- 最高杠杆≥7倍(检查)
max-leverage.json - 目标策略有空闲仓位(或有合理的轮换理由)
- ≥10名SM交易者(加密货币);XYZ股票类资产忽略交易者数量要求
可忽略条件:
- 不稳定的排名历史 — 扫描器会将当前跳涨排除在不稳定检查之外
- 低velocity — 首次跳涨还没有足够时间累积velocity
如果同时伴随CONTRIB_EXPLOSION: 双重确认,开仓信号强度更高。
2. CONTRIB_EXPLOSION
2. CONTRIB_EXPLOSION
What: 3x+ contribution increase in one scan from asset at rank #20+.
Action: Enter even if rank history looks "erratic." The contrib spike IS the signal regardless of prior rank bouncing.
Never downgraded for erratic history. Often accompanies FIRST_JUMP for double confirmation.
定义: 排名20+的资产在单次扫描中贡献度上涨3倍以上。
操作: 即使排名历史看起来“不稳定”也开仓,贡献度 spike 本身就是信号,和之前的排名波动无关。
永远不会因为历史排名不稳定降级。 通常伴随FIRST_JUMP出现,形成双重确认。
3. DEEP_CLIMBER
3. DEEP_CLIMBER
What: Steady climb from #30+, positive velocity (>= 0.03), 3+ reasons, clean rank history.
Action: Enter when it crosses into top 20. Route to conservative strategy if available.
定义: 从30名以外稳步爬升,velocity为正(≥0.03),满足3个以上开仓理由,排名历史清晰。
操作: 进入前20名时开仓,如果有可用的保守策略则路由到保守策略。
4. NEW_ENTRY_DEEP
4. NEW_ENTRY_DEEP
What: Appears in top 20 from nowhere (wasn't in top 50 last scan).
Action: Instant entry.
定义: 直接出现在前20名(上一次扫描不在前50名)。
操作: 立即开仓。
5. Opportunity Scanner (Score 175+)
5. 机会扫描(得分175+)
Runs every 15min. v6 scanner with BTC macro context, hourly trend classification, and hard disqualifiers. Complements Emerging Movers as a secondary signal source for deeper technical analysis.
每15分钟运行一次,v6扫描器结合BTC宏观行情上下文、小时级趋势分类、硬性排除规则,作为新兴标的扫描的补充信号源,提供更深度的技术分析。
Anti-Patterns — When NOT to Enter
反模式 — 禁止开仓的情况
- NEVER enter assets already at #1-10. That's the top, not the entry. Rank = what already happened.
- NEVER wait for a signal to "clean up." By the time rank history is smooth and velocity is high, the move is priced in.
- 4+ reasons at rank #5 = SKIP. The asset already peaked. You'd be buying the top.
- 2 reasons at rank #25 with a big jump = ENTER. The move is just starting.
- Leaderboard rank != future price direction. Rank reflects past trader concentration. Price moves first, rank follows.
- Negative velocity + no jump = skip. Slow bleeders going nowhere.
- Oversold shorts (RSI < 30 + extended 24h move) = skip.
- 绝对不要开仓已经排名1-10的资产。 那是顶部,不是入场点,排名反映的是已经发生的行情。
- 绝对不要等信号“变清晰”。 等排名历史平滑、velocity很高的时候,行情已经被定价了。
- 排名第5时满足4个以上开仓理由 = 跳过。 资产已经见顶,你会买在顶部。
- 排名25时出现大幅跳涨,满足2个开仓理由 = 进场。 行情才刚刚开始。
- 排行榜排名≠未来价格方向。 排名反映的是过去的交易者集中度,价格先动,排名才会跟上。
- velocity为负 + 无跳涨 = 跳过。 缓慢阴跌的标的没有行情。
- 超卖做空(RSI < 30 + 24小时大幅上涨)= 跳过。
Late Entry Anti-Pattern
晚进场反模式
This deserves its own section because it's the #1 way to lose money with WOLF.
The pattern: Scanner fires FIRST_JUMP for ASSET at #25->#14. You hesitate. Next scan it's #10. Next scan #7 with 5 reasons and clean history. NOW it looks "safe." You enter. It reverses from #5.
The fix: Enter on the FIRST signal or don't enter at all. If you missed it, wait for the next asset. There's always another FIRST_JUMP coming.
Rule: If an asset has been in the top 10 for 2+ scans already, it's too late. Move on.
这部分单独说明,因为这是使用WOLF亏损的首要原因。
典型场景: 扫描器触发某资产的FIRST_JUMP信号,排名从25→14,你犹豫了。下一次扫描它到了第10名,再下一次到第7名,有5个开仓理由,历史数据清晰,现在看起来“安全”了,你进场了,然后它在第5名开始反转。
解决方法: 要么在第一次信号出现时进场,要么干脆不进场。如果错过了,等下一个标的,永远会有新的FIRST_JUMP信号出现。
规则: 如果一个资产已经在前10名停留了2次以上扫描周期,就已经晚了,放弃它。
Phase 1 Auto-Cut
第一阶段自动平仓规则
Positions that never gain momentum get cut automatically.
Rules:
- 90-minute maximum in Phase 1 (pre-Tier 1 DSL). If ROE never hits 5% in 90 minutes, close.
- Weak peak early cut: If peak ROE was < 3% and ROE is now declining -> close after 45 minutes. Don't wait 90.
- Dead weight: SM conviction = 0, negative ROE, position open 30+ minutes -> instant cut regardless of phase.
Why: Phase 1 positions have no trailing stop protection. They're running on faith. If SM conviction doesn't materialize in 90 min, the thesis is wrong.
永远不会获得动量的仓位会被自动平仓。
规则:
- 第一阶段(DSL层级1之前)最长持有90分钟。 如果90分钟内ROE从未达到5%,平仓。
- 弱势峰值提前平仓: 如果峰值ROE<3%且ROE正在下降 → 45分钟后平仓,不需要等90分钟。
- 无效仓位: SM共识=0、负ROE、持仓超过30分钟 → 立即平仓,不管处于哪个阶段。
原因: 第一阶段的仓位没有追踪止损保护,完全依赖预期,如果90分钟内SM共识没有形成,说明交易逻辑不成立。
Exit Rules
平仓规则
1. DSL v4 Mechanical Exit (Trailing Stops)
1. DSL v4机械平仓(追踪止损)
All trailing stops handled automatically by across all strategies.
dsl-combined.py所有追踪止损由跨所有策略自动处理。
dsl-combined.py2. SM Conviction Collapse
2. SM共识崩塌
Conv drops to 0 or 4->1 with mass trader exodus -> instant cut.
共识降到0,或从4直接掉到1伴随大量交易者离场 → 立即平仓。
3. Dead Weight
3. 无效仓位
Conv 0, negative ROE, 30+ min -> instant cut.
共识0、负ROE、持仓超过30分钟 → 立即平仓。
4. SM Flip
4. SM反转
Conviction 4+ in the OPPOSITE direction with 100+ traders -> cut immediately.
相反方向共识≥4且有100+名交易者 → 立即平仓。
5. Race Condition Prevention
5. 竞态条件预防
When ANY job closes a position -> immediately:
- Set DSL state in
active: falsestate/{strategyKey}/dsl-{ASSET}.json - Alert user
- Evaluate: empty slot in that strategy for next signal?
v6 note: Since DSL is a combined runner iterating all strategies, no per-position crons to manage. Just set in the state file.
active: false任何任务平仓后 → 立即执行:
- 在中设置DSL状态
state/{strategyKey}/dsl-{ASSET}.jsonactive: false - 通知用户
- 评估:该策略是否有空余仓位承接下一个信号?
v6说明: 由于DSL是统一运行、遍历所有策略的,不需要管理每个仓位的cron,只需要在状态文件中设置即可。
active: falseDSL v4 — Trailing Stop System
DSL v4 — 追踪止损系统
Phase 1 (Pre-Tier 1): Absolute floor
第一阶段(层级1之前):绝对止损线
- LONG floor = entry x (1 - 5%/leverage)
- SHORT floor = entry x (1 + 5%/leverage)
- 3 consecutive breaches -> close
- Max duration: 90 minutes (see Phase 1 Auto-Cut above)
- 做多止损线 = 入场价 × (1 - 5%/杠杆倍数)
- 做空止损线 = 入场价 × (1 + 5%/杠杆倍数)
- 连续3次触发 → 平仓
- 最长持有时间:90分钟(见上文第一阶段自动平仓规则)
Phase 2 (Tier 1+): Trailing tiers
第二阶段(层级1及以上):追踪档位
| Tier | ROE Trigger | Lock % of High-Water | Breaches to Close |
|---|---|---|---|
| 1 | 5% | 50% | 2 |
| 2 | 10% | 65% | 2 |
| 3 | 15% | 75% | 2 |
| 4 | 20% | 85% | 1 |
| 档位 | ROE触发阈值 | 锁定最高收益比例 | 触发次数平仓 |
|---|---|---|---|
| 1 | 5% | 50% | 2次 |
| 2 | 10% | 65% | 2次 |
| 3 | 15% | 75% | 2次 |
| 4 | 20% | 85% | 1次 |
Stagnation Take-Profit
停滞止盈
Auto-close if ROE >= 8% and high-water stale for 1 hour.
如果ROE≥8%且最高收益停滞1小时,自动平仓。
DSL State File
DSL状态文件
Each position gets . The combined runner iterates all active state files across all strategies. See for the full schema and critical gotchas (triggerPct not threshold, lockPct not retracePct, etc.).
state/{strategyKey}/dsl-{ASSET}.jsonreferences/state-schema.md每个仓位对应一个文件,统一运行器会遍历所有策略的所有活跃状态文件。完整的schema和关键注意点见(triggerPct不是阈值、lockPct不是回撤比例等)。
state/{strategyKey}/dsl-{ASSET}.jsonreferences/state-schema.mdOpportunity Scanner v6
v6机会扫描器
The v6 scanner addresses all reliability issues from the previous version:
| Fix | What Changed |
|---|---|
| BTC Macro Context | Stage 0 analyzes BTC 4h+1h trend. Prevents alt longs during BTC crashes. |
| Hourly Trend Filter | |
| Hard Disqualifiers | 6 conditions that skip assets entirely (not just penalize score). |
| Parallel Fetches | ThreadPoolExecutor for candle fetches (~20s vs ~60s). |
| Cross-Scan Momentum | |
| Configurable Thresholds | Read from |
| Per-TF Error Recovery | One failed timeframe doesn't kill the asset. |
| Position Awareness | Checks ALL strategies' DSL states for conflicts. |
| No Cold Start | First scan produces baseline results immediately. |
v6扫描器解决了旧版本的所有可靠性问题:
| 修复点 | 改动内容 |
|---|---|
| BTC宏观行情上下文 | 第0阶段分析BTC 4小时+1小时趋势,避免BTC暴跌时做多山寨币 |
| 小时级趋势过滤 | |
| 硬性排除规则 | 6个直接排除标的的条件(不是仅扣分) |
| 并行获取数据 | 使用ThreadPoolExecutor获取K线,耗时从约60秒降到约20秒 |
| 跨扫描动量追踪 | 基于扫描历史计算 |
| 可配置阈值 | 从 |
| 单时间帧错误恢复 | 单个时间帧获取失败不会导致整个标的扫描失败 |
| 仓位感知 | 检查所有策略的DSL状态避免冲突 |
| 无冷启动问题 | 第一次扫描即可立即输出基线结果 |
Hard Disqualifiers
硬性排除规则
- Counter-trend on hourly (the "$346 lesson")
- Extreme RSI (<20 shorts, >80 longs)
- Counter-trend on 4h with strength >50
- Volume dying (<0.5x on both timeframes)
- Heavy unfavorable funding (>50% annualized)
- BTC macro headwind >30 points
Disqualified assets appear in output with and for transparency.
reasonwouldHaveScored- 小时级逆趋势(“346美元的教训”)
- 极端RSI(做空<20,做多>80)
- 4小时级逆趋势且强度>50
- 成交量萎缩(两个时间帧都<0.5倍平均)
- 资金费率过高(年化>50%)
- BTC宏观逆风>30分
被排除的资产会在输出中标注和,保证透明性。
reasonwouldHaveScoredRotation Rules
仓位轮换规则
When slots are full in a strategy and a new FIRST_JUMP or IMMEDIATE fires:
- Rotate if: new signal is FIRST_JUMP or has 3+ reasons + positive velocity AND weakest position in that strategy is flat/negative ROE with SM conv 0-1
- Hold if: current position in Tier 2+ or trending up with SM conv 3+
- Cross-strategy: If one strategy is full but another has slots, route to the available strategy instead of rotating
当某个策略仓位已满,同时新的FIRST_JUMP或IMMEDIATE信号触发时:
- 轮换条件: 新信号是FIRST_JUMP或满足3个以上开仓理由+velocity为正,且该策略中最弱的仓位是平/负ROE,SM共识0-1
- 持有条件: 当前仓位处于层级2+,或趋势向上且SM共识3+
- 跨策略调度: 如果一个策略已满但另一个策略有空闲仓位,直接路由到空闲策略,不需要轮换
Budget Scaling
预算缩放规则
All sizing is calculated from budget (30% per slot):
| Budget | Slots | Margin/Slot | Leverage | Daily Loss Limit |
|---|---|---|---|---|
| $500 | 2 | $150 | 7x | -$75 |
| $2,000 | 2 | $600 | 10x | -$300 |
| $6,500 | 3 | $1,950 | 10x | -$975 |
| $10,000+ | 3-4 | $3,000 | 10x | -$1,500 |
Minimum leverage: 7x. If max leverage for an asset is below 7x, skip it. Low leverage = low ROE = DSL tiers never trigger = dead position.
Auto-Delever: If a strategy's account drops below its -> reduce max slots by 1, close weakest in that strategy.
autoDeleverThreshold所有仓位大小基于预算计算(每个仓位槽占30%预算):
| 预算 | 仓位槽数 | 每个槽保证金 | 杠杆 | 单日亏损上限 |
|---|---|---|---|---|
| 500美元 | 2 | 150美元 | 7倍 | -75美元 |
| 2000美元 | 2 | 600美元 | 10倍 | -300美元 |
| 6500美元 | 3 | 1950美元 | 10倍 | -975美元 |
| 10000美元+ | 3-4 | 3000美元 | 10倍 | -1500美元 |
最低杠杆要求:7倍。 如果某资产的最高杠杆低于7倍,直接跳过。低杠杆=低ROE=DSL档位永远无法触发=无效仓位。
自动降杠杆: 如果某个策略的账户余额低于 → 减少1个最大仓位槽,平掉该策略中最弱的仓位。
autoDeleverThresholdPosition Lifecycle
仓位生命周期
Opening
开仓
- Signal fires -> validate checklist -> route to best-fit strategy
- on that strategy's wallet (use
create_positionfor XYZ assets)leverageType: "ISOLATED" - Create DSL state file in with
state/{strategyKey}/dsl-{ASSET}.jsonfieldstrategyKey - Alert user
- 信号触发 → 校验检查清单 → 路由到最匹配的策略
- 在对应策略的钱包执行(XYZ资产使用
create_position)leverageType: "ISOLATED" - 在创建DSL状态文件,填写
state/{strategyKey}/dsl-{ASSET}.json字段strategyKey - 通知用户
Closing
平仓
- Close via (or DSL auto-closes)
close_position - Immediately set DSL state
active: false - Alert user with strategy name for context
- Evaluate: empty slot in that strategy for next signal?
- 调用平仓(或DSL自动平仓)
close_position - 立即设置DSL状态
active: false - 通知用户,附带策略名称作为上下文
- 评估:该策略是否有空余仓位承接下一个信号?
Margin Types
保证金类型
- Cross-margin for crypto (BTC, ETH, SOL, etc.)
- Isolated margin for XYZ DEX (GOLD, SILVER, TSLA, etc.) — set and
leverageType: "ISOLATED"dex: "xyz" - Same wallet holds both cross crypto + isolated XYZ side by side
- 加密货币(BTC、ETH、SOL等)使用全仓保证金
- XYZ DEX资产(GOLD、SILVER、TSLA、AAPL等)使用逐仓保证金 — 设置和
leverageType: "ISOLATED"dex: "xyz" - 同一个钱包可以同时持有加密货币全仓仓位和XYZ逐仓仓位
XYZ Equities
XYZ股票类资产
XYZ DEX assets (GOLD, SILVER, TSLA, AAPL, etc.) behave differently:
- Ignore trader count. XYZ equities often have low SM trader counts — this doesn't invalidate the signal.
- Use reason count + rank velocity as primary quality filter instead.
- Always use isolated margin (,
leverageType: "ISOLATED").dex: "xyz" - Check max leverage — many XYZ assets cap at 5x or 3x. If below 7x, skip.
XYZ DEX资产(GOLD、SILVER、TSLA、AAPL等)表现不同:
- 忽略交易者数量。 XYZ股票类资产的SM交易者数量通常很低,不会使信号失效。
- 使用开仓理由数量+排名velocity作为主要质量过滤指标。
- 永远使用逐仓保证金(、
leverageType: "ISOLATED")。dex: "xyz" - 检查最高杠杆 — 很多XYZ资产的最高杠杆是5倍或3倍,低于7倍则跳过。
Token Optimization & Context Management
Token优化与上下文管理
Model tiers: See table in "Architecture — 7 Cron Jobs" section. Configure fast/cheap (Tier 1) vs capable (Tier 2) models in OpenClaw per-cron settings.
Heartbeat policy: If script output contains no actionable signals, output HEARTBEAT_OK immediately. Do not reason about what wasn't found.
Context isolation (multi-signal runs): Read ONCE per cron run. Build a complete action plan before executing any tool calls. Send ONE consolidated Telegram per run, not one per signal.
wolf-strategies.jsonSkip rules: Skip redundant checks when data < 3 min old. If all slots full and no FIRST_JUMPs → skip scanner processing. If SM check shows no flips and < 5 min old → skip.
模型层级: 见“架构 — 7个Cron任务”章节的表格,在OpenClaw的每个cron设置中配置快速/低成本(层级1)和高能力(层级2)模型。
心跳策略: 如果脚本输出没有可执行的信号,立即输出HEARTBEAT_OK,不要对未找到的内容做推理。
上下文隔离(多信号运行): 每个cron运行时仅读取一次,执行任何工具调用前先制定完整的操作计划,每次运行仅发送一条合并的Telegram消息,不要每个信号发一条。
wolf-strategies.json跳过规则: 数据小于3分钟时跳过冗余检查。如果所有仓位已满且无FIRST_JUMP信号 → 跳过扫描处理。如果SM检查显示无反转且数据小于5分钟 → 跳过。
Known Limitations
已知限制
- Watchdog blind spot for XYZ isolated: The watchdog monitors cross-margin buffer but can't see isolated position liquidation distances in the same way. XYZ positions rely on DSL for protection.
- Health check only sees crypto wallet: The health check can't see XYZ positions for margin calculations. Total equity may differ.
- Scanner needs history for momentum: Cross-scan momentum (scoreDelta, scanStreak) requires at least 2 scans. First scan produces scored results immediately but without momentum data.
- 看门狗对XYZ逐仓仓位监控存在盲区: 看门狗监控全仓保证金缓冲,但无法用同样的方式获取逐仓仓位的强平距离,XYZ仓位依赖DSL提供保护。
- 健康检查仅能读取加密货币钱包: 健康检查无法读取XYZ仓位做保证金计算,总权益可能存在差异。
- 扫描器需要历史数据计算动量: 跨扫描动量(scoreDelta、scanStreak)需要至少2次扫描数据,第一次扫描会立即输出评分结果但没有动量数据。
Backward Compatibility
向后兼容性
- auto-migrates legacy
wolf_config.pyto registry format on first loadwolf-strategy.json - Old files detected and migrated to
dsl-state-WOLF-*.jsonstate/wolf-{id}/dsl-*.json - All scripts work with both layouts during transition
- All DSL logic is handled by (multi-strategy runner)
dsl-combined.py
- 首次加载时会自动将旧版
wolf_config.py迁移为注册表格式wolf-strategy.json - 旧的文件会被检测到并迁移到
dsl-state-WOLF-*.jsonstate/wolf-{id}/dsl-*.json - 过渡期间所有脚本兼容两种布局
- 所有DSL逻辑由(多策略运行器)处理
dsl-combined.py
Troubleshooting
故障排查
See for known bugs, gotchas, and trading discipline rules. Key ones:
references/learnings.md- actually executes — NEVER use dryRun
dryRun: true - Max leverage varies per asset — always check
max-leverage.json - is the close tool — not
close_positionedit_position - Tier 1 lock != guaranteed profit — lock is from high-water, not entry
已知bug、注意点和交易纪律规则见,核心要点:
references/learnings.md- 会实际执行交易 — 永远不要使用dryRun
dryRun: true - 每个资产的最高杠杆不同 — 始终检查
max-leverage.json - 平仓工具是— 不是
close_positionedit_position - 层级1锁仓不等于保证盈利 — 锁仓基于最高收益,不是入场价
Scripts Reference
脚本参考
| Script | Purpose |
|---|---|
| Setup wizard — adds strategy to registry from budget |
| Shared config loader — all scripts import this |
| Emerging Movers v4 scanner (FIRST_JUMP, IMMEDIATE, CONTRIB_EXPLOSION) |
| DSL v4 combined trailing stop engine (all positions, all strategies) |
| SM conviction flip detector (multi-strategy) |
| Watchdog — per-strategy margin buffer + position health |
| Opportunity Scanner v6 (BTC macro, hourly trend, disqualifiers) |
| Per-strategy orphan DSL / state validation |
| 脚本 | 用途 |
|---|---|
| 设置向导 — 根据预算将策略添加到注册表 |
| 共享配置加载器 — 所有脚本都会导入 |
| v4新兴标的扫描器(识别FIRST_JUMP、IMMEDIATE、CONTRIB_EXPLOSION) |
| DSL v4统一追踪止损引擎(处理所有策略的所有仓位) |
| SM共识反转检测器(多策略支持) |
| 看门狗 — 单策略保证金缓冲 + 仓位健康监控 |
| v6机会扫描器(BTC宏观行情、小时级趋势、排除规则) |
| 单策略孤立DSL / 状态校验 |