一键导入
regime-detector
Detects the current market regime (HighVol, LowVol, Trending, Ranging) from BTC price data and recommends strategy adjustments.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Detects the current market regime (HighVol, LowVol, Trending, Ranging) from BTC price data and recommends strategy adjustments.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | regime-detector |
| description | Detects the current market regime (HighVol, LowVol, Trending, Ranging) from BTC price data and recommends strategy adjustments. |
| version | 1.0.0 |
| user-invocable | true |
| metadata | {"openclaw":{"requires":{"bins":["curl","jq"]}}} |
Detect the current market regime by analyzing BTC/USDT price data from Binance, then recommend strategy adjustments via governance policy updates.
| Regime | BTC 60m Range/Avg | ADX Proxy | Recommended Crypto Mode | Kelly | Max Intent % |
|---|---|---|---|---|---|
| HighVol | > 2.5% | any | vol_straddle | 0.15 | 50% |
| LowVol | < 0.8% | < 20 | arb_only | 0.30 | 100% |
| Trending | 1.0-2.5% | > 25 | directional | 0.25 | 100% |
| Ranging | 0.8-2.5% | < 25 | arb_only | 0.20 | 75% |
curl -sf 'https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1m&limit=60' | jq '[.[] | {open: (.[1] | tonumber), high: (.[2] | tonumber), low: (.[3] | tonumber), close: (.[4] | tonumber), volume: (.[5] | tonumber)}]'
curl -sf 'https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=5m&limit=12' | jq '[.[] | {open: (.[1] | tonumber), close: (.[4] | tonumber), direction: (if (.[4] | tonumber) > (.[1] | tonumber) then "up" else "down" end)}]'
curl -sf 'https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1m&limit=60' | jq '
[.[].[-3] | tonumber] as $closes |
($closes | add / length) as $avg |
($closes | max) as $high |
($closes | min) as $low |
{
avg_price: ($avg | round),
range_usd: (($high - $low) | . * 100 | round / 100),
range_pct: ((($high - $low) / $avg * 100) | . * 100 | round / 100),
current: ($closes | last | round),
candles: ($closes | length)
}
'
From the gathered data, calculate:
(high - low) / avg * 100 over 60 1m candlesApply the classification rules from the table above:
range_pct > 2.5 → HighVolrange_pct < 0.8 → LowVolrange_pct between 0.8-2.5 AND adx_proxy > 25 → Trendingrange_pct between 0.8-2.5 AND adx_proxy <= 25 → RangingIMPORTANT: Only trigger a regime change if the SAME regime is detected on two consecutive checks. This prevents whipsawing on transient spikes.
Check memory for the previous regime reading:
Write to memory: regime_reading: {regime} at {timestamp}, confirmed: {true/false}
If regime is confirmed and different from current policy, update governance:
# First read current policy
CURRENT=$(curl -sf $PLOY_API_BASE/api/governance/policy -H "x-ploy-admin-token: $PLOY_API_ADMIN_TOKEN")
# Update with new regime settings
curl -sf -X PUT $PLOY_API_BASE/api/governance/policy \
-H "Content-Type: application/json" \
-H "x-ploy-admin-token: $PLOY_API_ADMIN_TOKEN" \
-d '{
"block_new_intents": false,
"blocked_domains": [],
"max_intent_notional_usd": <FROM_REGIME_TABLE>,
"max_total_notional_usd": <SCALED_BY_MAX_INTENT_PCT>,
"updated_by": "openclaw.regime-detector",
"reason": "Regime change: <OLD> → <NEW> (range_pct=X.X%, adx_proxy=Y)"
}' | jq .
Output a summary:
Regime: <REGIME> (confidence: <0.0-1.0>)
BTC 60m: range $X ($Y%) | avg $Z
Trend: <direction> (X/12 candles aligned)
Action: <updated governance / no change / waiting for confirmation>
Makes capital allocation decisions based on market regime and agent performance. Adjusts governance policy to control entry modes, kelly fractions, and per-agent allocation limits.
Manages the Ploy governance policy including blocking intents, domain controls, notional limits, metadata updates, and agent pause/resume operations.
Core interface to the Ploy Polymarket trading bot REST API. Provides commands for health checks, positions, risk state, intent submission, governance policy, and system control.
Monitors risk metrics in real-time, detects dangerous conditions (drawdown spikes, circuit breaker events, position concentration), and triggers emergency actions when needed.
Query allowlisted PLOY research and market-data methods over SSH without remote mutations.