원클릭으로
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 직업 분류 기준
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.
| 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>