wolf-strategy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

WOLF 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
)

Central config holding all strategies. Created/updated by
wolf-setup.py
.
wolf-strategies.json
├── strategies
│   ├── wolf-abc123 (Aggressive Momentum, 3 slots, 10x)
│   └── wolf-xyz789 (Conservative XYZ, 2 slots, 7x)
└── global (telegram, workspace)
存储所有策略的核心配置,由
wolf-setup.py
创建和更新。
wolf-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.json

Signal Routing

信号路由规则

When a signal fires, it's routed to the best-fit strategy:
  1. Which strategies have empty slots?
  2. Does any strategy already hold this asset? (skip within strategy, allow cross-strategy)
  3. Which strategy's risk profile matches? (aggressive gets FIRST_JUMPs, conservative gets DEEP_CLIMBERs)
  4. Route to best-fit -> open on that wallet -> create DSL state in that strategy's dir
当信号触发时,会自动路由到最匹配的策略:
  1. 哪些策略还有空闲仓位槽?
  2. 有没有策略已经持有该资产?(同一策略内跳过,跨策略允许)
  3. 哪个策略的风险 profile 匹配?(激进策略承接FIRST_JUMP信号,保守策略承接DEEP_CLIMBER信号)
  4. 路由到最优匹配策略 → 在对应钱包开仓 → 在该策略的状态目录下创建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 conservative
This adds to the registry without disrupting running strategies. Disable with
enabled: false
in the registry.

bash
python3 scripts/wolf-setup.py --wallet 0x... --strategy-id UUID --budget 2000 \
    --chat-id 12345 --name "Conservative XYZ" --dsl-preset conservative
该操作会将新策略添加到注册表,不会影响正在运行的策略。在注册表中设置
enabled: false
即可停用对应策略。

Entry 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

快速开始

  1. Ensure Senpi MCP is connected (
    mcporter list
    should show
    senpi
    )
  2. Create a custom strategy wallet: use
    strategy_create_custom_strategy
    via mcporter
  3. Fund the wallet via
    strategy_top_up
    with your budget
  4. Run setup:
    python3 scripts/wolf-setup.py --wallet 0x... --strategy-id UUID --budget 6500 --chat-id 12345
  5. Create the 7 OpenClaw crons using templates from
    references/cron-templates.md
  6. The WOLF is hunting
To add a second strategy, run
wolf-setup.py
again with a different wallet/budget. It adds to the registry.

  1. 确保Senpi MCP已连接(运行
    mcporter list
    应该能看到
    senpi
  2. 创建自定义策略钱包:通过mcporter调用
    strategy_create_custom_strategy
  3. 调用
    strategy_top_up
    向钱包转入对应预算的资金
  4. 运行初始化脚本:
    python3 scripts/wolf-setup.py --wallet 0x... --strategy-id UUID --budget 6500 --chat-id 12345
  5. 使用
    references/cron-templates.md
    中的模板创建7个OpenClaw cron任务
  6. WOLF开始自动运行
如需添加第二个策略,使用不同的钱包/预算再次运行
wolf-setup.py
即可,新策略会自动添加到注册表。

Architecture — 7 Cron Jobs

架构 — 7个Cron任务

#JobIntervalScriptPurpose
1Emerging Movers90s
scripts/emerging-movers.py
Hunt FIRST_JUMP + IMMEDIATE_MOVER signals — primary entry trigger
2DSL Combined3min
scripts/dsl-combined.py
Trailing stop exits for ALL open positions across ALL strategies
3SM Flip Detector5min
scripts/sm-flip-check.py
Cut positions where SM conviction collapses
4Watchdog5min
scripts/wolf-monitor.py
Per-strategy margin buffer, liq distances, rotation candidates
5Portfolio Update15min(agent-driven)Per-strategy PnL reporting to user
6Opportunity Scanner15min
scripts/opportunity-scan-v6.py
Deep-dive 4-pillar scoring with BTC macro, hourly trend, disqualifiers
7Health Check10min
scripts/job-health-check.py
Per-strategy orphan DSL detection, state validation
v6 change: One set of crons for all strategies. Each script reads
wolf-strategies.json
and iterates all enabled strategies internally.
v6 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秒
scripts/emerging-movers.py
捕捉FIRST_JUMP + IMMEDIATE_MOVER信号 — 核心开仓触发器
2DSL统一运行3分钟
scripts/dsl-combined.py
为所有策略的所有持仓执行追踪止损平仓
3SM反转检测5分钟
scripts/sm-flip-check.py
平掉SM共识崩塌的仓位
4看门狗监控5分钟
scripts/wolf-monitor.py
单策略保证金缓冲监控、强平距离检测、仓位轮换候选筛选
5投资组合更新15分钟(Agent驱动)向用户发送单策略PnL报告
6机会扫描15分钟
scripts/opportunity-scan-v6.py
结合BTC宏观行情、小时级趋势、排除规则的4维度深度评分
7健康检查10分钟
scripts/job-health-check.py
单策略孤立DSL检测、状态校验
v6改动: 所有策略共用一套cron任务,每个脚本会读取
wolf-strategies.json
并内部遍历所有已启用的策略。
v6改动: 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).
CronModel TierReason
Emerging MoversTier 2 (capable)Multi-strategy routing judgment, entry decisions
Opportunity ScannerTier 2 (capable)Complex 4-pillar analysis, conflict resolution
DSL CombinedTier 1 (fast/cheap)Binary:
status=="closed"
→ alert, else HEARTBEAT_OK
SM Flip DetectorTier 1 (fast/cheap)Binary: conviction≥4 + 100 traders → close
WatchdogTier 1 (fast/cheap)Threshold checks → alert
Portfolio UpdateTier 1 (fast/cheap)Text formatting, no decisions
Health CheckTier 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(快速/低成本)二元判断:
status=="closed"
→ 告警,否则返回HEARTBEAT_OK
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
references/cron-templates.md
. Read that file, replace the placeholders (only
{TELEGRAM}
and
{SCRIPTS}
in v6), and create all 7 crons.
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的具体指令文本在**
references/cron-templates.md
**中。读取该文件,替换占位符(v6中仅需要替换
{TELEGRAM}
{SCRIPTS}
),创建全部7个cron。
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:
  • isFirstJump: true
    in scanner output
  • 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
dsl-combined.py
across all strategies.
所有追踪止损由
dsl-combined.py
跨所有策略自动处理。

2. 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:
  1. Set DSL state
    active: false
    in
    state/{strategyKey}/dsl-{ASSET}.json
  2. Alert user
  3. 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
active: false
in the state file.

任何任务平仓后 → 立即执行:
  1. state/{strategyKey}/dsl-{ASSET}.json
    中设置DSL状态
    active: false
  2. 通知用户
  3. 评估:该策略是否有空余仓位承接下一个信号?
v6说明: 由于DSL是统一运行、遍历所有策略的,不需要管理每个仓位的cron,只需要在状态文件中设置
active: false
即可。

DSL 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及以上):追踪档位

TierROE TriggerLock % of High-WaterBreaches to Close
15%50%2
210%65%2
315%75%2
420%85%1
档位ROE触发阈值锁定最高收益比例触发次数平仓
15%50%2次
210%65%2次
315%75%2次
420%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
state/{strategyKey}/dsl-{ASSET}.json
. The combined runner iterates all active state files across all strategies. See
references/state-schema.md
for the full schema and critical gotchas (triggerPct not threshold, lockPct not retracePct, etc.).

每个仓位对应一个
state/{strategyKey}/dsl-{ASSET}.json
文件,统一运行器会遍历所有策略的所有活跃状态文件。完整的schema和关键注意点见
references/state-schema.md
(triggerPct不是阈值、lockPct不是回撤比例等)。

Opportunity Scanner v6

v6机会扫描器

The v6 scanner addresses all reliability issues from the previous version:
FixWhat Changed
BTC Macro ContextStage 0 analyzes BTC 4h+1h trend. Prevents alt longs during BTC crashes.
Hourly Trend Filter
classify_hourly_trend()
analyzes swing structure. Counter-trend on hourly = hard skip.
Hard Disqualifiers6 conditions that skip assets entirely (not just penalize score).
Parallel FetchesThreadPoolExecutor for candle fetches (~20s vs ~60s).
Cross-Scan Momentum
scoreDelta
and
scanStreak
from scan history.
Configurable ThresholdsRead from
history/scanner-config.json
.
Per-TF Error RecoveryOne failed timeframe doesn't kill the asset.
Position AwarenessChecks ALL strategies' DSL states for conflicts.
No Cold StartFirst scan produces baseline results immediately.
v6扫描器解决了旧版本的所有可靠性问题:
修复点改动内容
BTC宏观行情上下文第0阶段分析BTC 4小时+1小时趋势,避免BTC暴跌时做多山寨币
小时级趋势过滤
classify_hourly_trend()
分析摆动结构,小时级逆趋势的标的直接排除
硬性排除规则6个直接排除标的的条件(不是仅扣分)
并行获取数据使用ThreadPoolExecutor获取K线,耗时从约60秒降到约20秒
跨扫描动量追踪基于扫描历史计算
scoreDelta
scanStreak
可配置阈值
history/scanner-config.json
读取配置
单时间帧错误恢复单个时间帧获取失败不会导致整个标的扫描失败
仓位感知检查所有策略的DSL状态避免冲突
无冷启动问题第一次扫描即可立即输出基线结果

Hard Disqualifiers

硬性排除规则

  1. Counter-trend on hourly (the "$346 lesson")
  2. Extreme RSI (<20 shorts, >80 longs)
  3. Counter-trend on 4h with strength >50
  4. Volume dying (<0.5x on both timeframes)
  5. Heavy unfavorable funding (>50% annualized)
  6. BTC macro headwind >30 points
Disqualified assets appear in output with
reason
and
wouldHaveScored
for transparency.

  1. 小时级逆趋势(“346美元的教训”)
  2. 极端RSI(做空<20,做多>80)
  3. 4小时级逆趋势且强度>50
  4. 成交量萎缩(两个时间帧都<0.5倍平均)
  5. 资金费率过高(年化>50%)
  6. BTC宏观逆风>30分
被排除的资产会在输出中标注
reason
wouldHaveScored
,保证透明性。

Rotation 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):
BudgetSlotsMargin/SlotLeverageDaily Loss Limit
$5002$1507x-$75
$2,0002$60010x-$300
$6,5003$1,95010x-$975
$10,000+3-4$3,00010x-$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
autoDeleverThreshold
-> reduce max slots by 1, close weakest in that strategy.

所有仓位大小基于预算计算(每个仓位槽占30%预算):
预算仓位槽数每个槽保证金杠杆单日亏损上限
500美元2150美元7倍-75美元
2000美元2600美元10倍-300美元
6500美元31950美元10倍-975美元
10000美元+3-43000美元10倍-1500美元
最低杠杆要求:7倍。 如果某资产的最高杠杆低于7倍,直接跳过。低杠杆=低ROE=DSL档位永远无法触发=无效仓位。
自动降杠杆: 如果某个策略的账户余额低于
autoDeleverThreshold
→ 减少1个最大仓位槽,平掉该策略中最弱的仓位。

Position Lifecycle

仓位生命周期

Opening

开仓

  1. Signal fires -> validate checklist -> route to best-fit strategy
  2. create_position
    on that strategy's wallet (use
    leverageType: "ISOLATED"
    for XYZ assets)
  3. Create DSL state file in
    state/{strategyKey}/dsl-{ASSET}.json
    with
    strategyKey
    field
  4. Alert user
  1. 信号触发 → 校验检查清单 → 路由到最匹配的策略
  2. 在对应策略的钱包执行
    create_position
    (XYZ资产使用
    leverageType: "ISOLATED"
  3. state/{strategyKey}/dsl-{ASSET}.json
    创建DSL状态文件,填写
    strategyKey
    字段
  4. 通知用户

Closing

平仓

  1. Close via
    close_position
    (or DSL auto-closes)
  2. Immediately set DSL state
    active: false
  3. Alert user with strategy name for context
  4. Evaluate: empty slot in that strategy for next signal?

  1. 调用
    close_position
    平仓(或DSL自动平仓)
  2. 立即设置DSL状态
    active: false
  3. 通知用户,附带策略名称作为上下文
  4. 评估:该策略是否有空余仓位承接下一个信号?

Margin Types

保证金类型

  • Cross-margin for crypto (BTC, ETH, SOL, etc.)
  • Isolated margin for XYZ DEX (GOLD, SILVER, TSLA, etc.) — set
    leverageType: "ISOLATED"
    and
    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
wolf-strategies.json
ONCE per cron run. Build a complete action plan before executing any tool calls. Send ONE consolidated Telegram per run, not one per signal.
Skip 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运行时仅读取一次
wolf-strategies.json
,执行任何工具调用前先制定完整的操作计划,每次运行仅发送一条合并的Telegram消息,不要每个信号发一条。
跳过规则: 数据小于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

向后兼容性

  • wolf_config.py
    auto-migrates legacy
    wolf-strategy.json
    to registry format on first load
  • Old
    dsl-state-WOLF-*.json
    files detected and migrated to
    state/wolf-{id}/dsl-*.json
  • All scripts work with both layouts during transition
  • All DSL logic is handled by
    dsl-combined.py
    (multi-strategy runner)

  • wolf_config.py
    首次加载时会自动将旧版
    wolf-strategy.json
    迁移为注册表格式
  • 旧的
    dsl-state-WOLF-*.json
    文件会被检测到并迁移到
    state/wolf-{id}/dsl-*.json
  • 过渡期间所有脚本兼容两种布局
  • 所有DSL逻辑由
    dsl-combined.py
    (多策略运行器)处理

Troubleshooting

故障排查

See
references/learnings.md
for known bugs, gotchas, and trading discipline rules. Key ones:
  • dryRun: true
    actually executes
    — NEVER use dryRun
  • Max leverage varies per asset — always check
    max-leverage.json
  • close_position
    is the close tool
    — not
    edit_position
  • Tier 1 lock != guaranteed profit — lock is from high-water, not entry

已知bug、注意点和交易纪律规则见
references/learnings.md
,核心要点:
  • dryRun: true
    会实际执行交易
    — 永远不要使用dryRun
  • 每个资产的最高杠杆不同 — 始终检查
    max-leverage.json
  • 平仓工具是
    close_position
    — 不是
    edit_position
  • 层级1锁仓不等于保证盈利 — 锁仓基于最高收益,不是入场价

Scripts Reference

脚本参考

ScriptPurpose
scripts/wolf-setup.py
Setup wizard — adds strategy to registry from budget
scripts/wolf_config.py
Shared config loader — all scripts import this
scripts/emerging-movers.py
Emerging Movers v4 scanner (FIRST_JUMP, IMMEDIATE, CONTRIB_EXPLOSION)
scripts/dsl-combined.py
DSL v4 combined trailing stop engine (all positions, all strategies)
scripts/sm-flip-check.py
SM conviction flip detector (multi-strategy)
scripts/wolf-monitor.py
Watchdog — per-strategy margin buffer + position health
scripts/opportunity-scan-v6.py
Opportunity Scanner v6 (BTC macro, hourly trend, disqualifiers)
scripts/job-health-check.py
Per-strategy orphan DSL / state validation
脚本用途
scripts/wolf-setup.py
设置向导 — 根据预算将策略添加到注册表
scripts/wolf_config.py
共享配置加载器 — 所有脚本都会导入
scripts/emerging-movers.py
v4新兴标的扫描器(识别FIRST_JUMP、IMMEDIATE、CONTRIB_EXPLOSION)
scripts/dsl-combined.py
DSL v4统一追踪止损引擎(处理所有策略的所有仓位)
scripts/sm-flip-check.py
SM共识反转检测器(多策略支持)
scripts/wolf-monitor.py
看门狗 — 单策略保证金缓冲 + 仓位健康监控
scripts/opportunity-scan-v6.py
v6机会扫描器(BTC宏观行情、小时级趋势、排除规则)
scripts/job-health-check.py
单策略孤立DSL / 状态校验