[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X8PTHFFSJC7T8HT67H6YR2":3,"skill-same:01M6X8PTHFFSJC7T8HT67H6YR2":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6X8PTHFFSJC7T8HT67H6YR2","rsi-reversal-regime-dependency",null,"Use when evaluating any RSI-based reversal or mean-reversion signal on HyperLiquid perpetuals. RSI reversals have strong regime dependency — they work in ranging\u002Fmean-reverting conditions and fail catastrophically in trending conditions. This skill documents the full regime filter stack, divergence confirmation requirements, failure modes specific to RSI reversals in perpetuals, and how RSI signals coordinate with EMA cross signals in mixed-regime conditions.","enuno\u002Fcrewless-capital","enuno","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6727752?v=4","01M6J09HF6Y74150F7PEMC446X","Elvis Nuno","01M6X86WGZG9RH09ACTSTJ2383",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fenuno\u002Fcrewless-capital\u002Fblob\u002Fmain\u002Fmigrate-hyperliquid-firm\u002Fmulticlaw\u002Fmetaclaw\u002Fskills\u002Fstrategy\u002Frsi-reversal-regime-dependency\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"rsi reversal regime dependency","dependency","rsi","perpetuals","when","signal","modes","with","trending","filter","requirements","signals","agentic","coordinate","use","confirmation","work","stack","how","documents","2026-11-10 10:12:30",false,"---\nname: rsi-reversal-regime-dependency\ndescription: Use when evaluating any RSI-based reversal or mean-reversion signal on HyperLiquid perpetuals. RSI reversals have strong regime dependency — they work in ranging\u002Fmean-reverting conditions and fail catastrophically in trending conditions. This skill documents the full regime filter stack, divergence confirmation requirements, failure modes specific to RSI reversals in perpetuals, and how RSI signals coordinate with EMA cross signals in mixed-regime conditions.\ncategory: agentic\n---\n\n# RSI Reversal Regime Dependency\n\n## When This Skill Activates\n\nApply this skill:\n\n- Before acting on any RSI overbought (> 70) or oversold (\u003C 30)\n  reversal signal on HyperLiquid perpetuals\n- When RSI divergence (price makes new high\u002Flow but RSI does not)\n  is observed and a reversal entry is being considered\n- When a mean-reversion or fade strategy is being evaluated for\n  a trending asset — RSI is the most common source of premature\n  fade entries in trending markets\n- When coordinating RSI signals with EMA cross signals in the same\n  session — the two strategy types have opposing regime requirements\n  and must not generate conflicting simultaneous positions\n- When classifying a post-trade loss from a reversal strategy to\n  determine whether regime filters should be tightened\n\n---\n\n## Core Principle: RSI Is a Regime-Conditional Indicator\n\nRSI does not measure absolute overbought or oversold conditions.\nIt measures the *speed and magnitude of recent price changes*\nrelative to the lookback period. In a strong trend, RSI can remain\nabove 70 for extended periods — this is not an error, it is the\nexpected output of a fast-moving trending market.\n\n**The fundamental regime split:**\n\n| Regime | RSI Behavior | RSI Signal Validity | Strategy Action |\n|---|---|---|---|\n| Ranging \u002F mean-reverting | RSI oscillates 30-70, reverts quickly | High — oversold\u002Foverbought are actionable | RSI reversals valid |\n| Trending (established) | RSI holds 60-85 (bull) or 15-40 (bear) | Low — readings are regime artifacts | RSI reversals invalid; use EMA cross |\n| Trending (mature\u002Fexhaustion) | RSI diverges from price at extremes | Medium — divergence only, not level | RSI divergence entries valid with confirmation |\n| Post-cascade \u002F high fragility | RSI collapses then bounces rapidly | Very low — cascade-driven distortion | No RSI entries during cascade |\n\n> **Rule**: Never fade an RSI extreme in a trending market.\n> An RSI reading of 78 in an established uptrend is not\n> overbought — it is confirmation the trend is strong.\n> The same reading in a ranging market is a valid short setup.\n\n---\n\n## Regime Classification for RSI Signals\n\n```python\ndef classify_rsi_regime(\n    adx_14: float,\n    bb_width_pct: float,\n    bb_width_20p_median: float,\n    hh_hl_count: int,             # from trending-bull-entry-timing\n    atr_current: float,\n    atr_20p_median: float,\n    cascade_score: int,           # from liquidation-cascade-risk\n) -> dict:\n    \"\"\"\n    Classify the current regime for RSI signal validity.\n    Returns regime class and whether RSI reversal signals are\n    permitted, divergence-only, or fully blocked.\n    \"\"\"\n    # Cascade override: always block during cascade\n    if cascade_score >= 5:\n        return {\n            \"regime\": \"CASCADE\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": False,\n            \"reason\": f\"Cascade score={cascade_score} >= 5. No RSI entries during cascade.\",\n        }\n\n    trending     = adx_14 >= 25.0\n    strong_trend = adx_14 >= 35.0\n    mature_trend = hh_hl_count >= 7\n    ranging      = adx_14 \u003C 20.0 and bb_width_pct \u003C= bb_width_20p_median * 1.10\n    compressed   = bb_width_pct \u003C bb_width_20p_median * 0.75  # pre-breakout\n\n    if strong_trend and not mature_trend:\n        return {\n            \"regime\": \"STRONG_TREND\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": False,\n            \"reason\": f\"ADX={adx_14:.1f} >= 35 (strong trend). RSI extremes are \"\n                      \"regime artifacts, not reversal signals. Use EMA cross instead.\",\n        }\n\n    if trending and mature_trend:\n        return {\n            \"regime\": \"MATURE_TREND\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": True,   # divergence only\n            \"reason\": f\"ADX={adx_14:.1f}, HH\u002FHL_count={hh_hl_count} >= 7. \"\n                      \"Trend mature: reversal entries require RSI divergence confirmation.\",\n        }\n\n    if trending and not mature_trend:\n        return {\n            \"regime\": \"EARLY_TREND\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": False,\n            \"reason\": f\"ADX={adx_14:.1f} trend established but not mature. \"\n                      \"RSI reversals invalid. Wait for ranging regime.\",\n        }\n\n    if compressed:\n        return {\n            \"regime\": \"COMPRESSION\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": False,\n            \"reason\": \"BB width compressed below 75% of median. Pre-breakout compression: \"\n                      \"RSI signals unreliable before directional resolution.\",\n        }\n\n    if ranging:\n        return {\n            \"regime\": \"RANGING\",\n            \"rsi_reversal_permitted\": True,\n            \"divergence_permitted\": True,\n            \"reason\": f\"ADX={adx_14:.1f} \u003C 20, BB width within median. \"\n                      \"Ranging regime: RSI reversals valid with confirmation.\",\n        }\n\n    # Transitional \u002F ambiguous regime\n    return {\n        \"regime\": \"TRANSITIONAL\",\n        \"rsi_reversal_permitted\": False,\n        \"divergence_permitted\": False,\n        \"reason\": f\"ADX={adx_14:.1f} transitional (20-25). Regime ambiguous: \"\n                  \"wait for confirmation before RSI entries.\",\n    }\n```\n\n---\n\n## RSI Signal Types and Requirements\n\n### Type 1: Level-Based Reversal (Ranging Regime Only)\n\nA simple RSI overbought (> 70) or oversold (\u003C 30) entry. Valid\n**only** in a confirmed ranging regime (ADX \u003C 20).\n\n```python\ndef evaluate_rsi_level_signal(\n    rsi_14: float,\n    direction: str,              # \"long\" (from oversold) or \"short\" (from overbought)\n    regime: dict,                # from classify_rsi_regime()\n    price: float,\n    range_high: float,           # resistance level of current range\n    range_low: float,            # support level of current range\n    funding_1h_pct: float,       # from high-funding-carry-avoidance\n) -> dict:\n    if not regime[\"rsi_reversal_permitted\"]:\n        return {\n            \"signal_valid\": False,\n            \"reason\": f\"Regime blocks RSI reversal: {regime['reason']}\",\n        }\n\n    # RSI threshold check\n    oversold_ok  = direction == \"long\"  and rsi_14 \u003C= 30.0\n    overbought_ok = direction == \"short\" and rsi_14 >= 70.0\n    rsi_level_ok = oversold_ok or overbought_ok\n\n    # Price at range boundary confirmation\n    if direction == \"long\":\n        at_range_boundary = price \u003C= range_low * 1.005   # within 0.5% of support\n    else:\n        at_range_boundary = price >= range_high * 0.995  # within 0.5% of resistance\n\n    # Funding check for longs (crowded long at range low is fragile)\n    funding_ok = not (direction == \"long\" and funding_1h_pct > 0.020)\n\n    signal_valid = rsi_level_ok and at_range_boundary and funding_ok\n    return {\n        \"signal_valid\":      signal_valid,\n        \"signal_type\":       \"RSI_LEVEL\",\n        \"rsi_14\":            rsi_14,\n        \"at_range_boundary\": at_range_boundary,\n        \"funding_ok\":        funding_ok,\n        \"reason\": (\n            \"RSI level signal confirmed.\" if signal_valid else\n            \"; \".join(filter(None, [\n                f\"RSI={rsi_14:.1f} not at threshold\" if not rsi_level_ok else None,\n                \"price not at range boundary\"         if not at_range_boundary else None,\n                f\"funding={funding_1h_pct:.3f}% crowded long\" if not funding_ok else None,\n            ]))\n        ),\n    }\n```\n\n### Type 2: RSI Divergence (Mature Trend or Ranging)\n\nBullish divergence: price makes a lower low but RSI makes a higher\nlow. Bearish divergence: price makes a higher high but RSI makes a\nlower high. More reliable than level-based entries; valid in mature\ntrends as a potential exhaustion signal.\n\n```python\ndef evaluate_rsi_divergence(\n    price_swing_1: float,        # older swing high\u002Flow\n    price_swing_2: float,        # newer swing high\u002Flow\n    rsi_swing_1: float,          # RSI at older swing\n    rsi_swing_2: float,          # RSI at newer swing\n    divergence_type: str,        # \"bullish\" or \"bearish\"\n    regime: dict,\n    candles_between_swings: int, # time between swings (validity window)\n    volume_at_swing_2: float,\n    volume_20p_avg: float,\n) -> dict:\n    if not regime[\"divergence_permitted\"]:\n        return {\n            \"divergence_valid\": False,\n            \"reason\": f\"Regime does not permit divergence entries: {regime['reason']}\",\n        }\n\n    # Validate divergence structure\n    if divergence_type == \"bullish\":\n        price_diverges = price_swing_2 \u003C price_swing_1   # lower low in price\n        rsi_diverges   = rsi_swing_2   > rsi_swing_1     # higher low in RSI\n    else:\n        price_diverges = price_swing_2 > price_swing_1   # higher high in price\n        rsi_diverges   = rsi_swing_2   \u003C rsi_swing_1     # lower high in RSI\n\n    structure_ok = price_diverges and rsi_diverges\n\n    # Time validity: swings too close = noise; too far = stale divergence\n    time_ok = 5 \u003C= candles_between_swings \u003C= 50\n\n    # Volume confirmation: second swing should have lower volume\n    # (exhaustion) for divergence to be meaningful\n    volume_declining = volume_at_swing_2 \u003C volume_20p_avg * 0.85\n\n    divergence_valid = structure_ok and time_ok and volume_declining\n    return {\n        \"divergence_valid\":    divergence_valid,\n        \"signal_type\":         \"RSI_DIVERGENCE\",\n        \"divergence_type\":     divergence_type,\n        \"price_diverges\":      price_diverges,\n        \"rsi_diverges\":        rsi_diverges,\n        \"time_ok\":             time_ok,\n        \"volume_declining\":    volume_declining,\n        \"candles_between\":     candles_between_swings,\n        \"reason\": (\n            f\"{divergence_type.capitalize()} divergence confirmed.\" if divergence_valid else\n            \"; \".join(filter(None, [\n                \"No divergence structure\"          if not structure_ok else None,\n                f\"{candles_between_swings} candles between swings (req 5-50)\" if not time_ok else None,\n                \"Volume not declining at swing 2\"  if not volume_declining else None,\n            ]))\n        ),\n    }\n```\n\n---\n\n## RSI Failure Modes Specific to Perpetuals\n\n### RFM-1: Trend Fade Loss\n\n**Description**: RSI overbought\u002Foversold signal taken in a trending\nmarket. The trend continues, RSI remains elevated\u002Fdepressed for\nextended periods, and the position is stopped out multiple times\nas the trader repeatedly fades the trend.\n\n**Identification**: ADX ≥ 25 at entry. Loss came from repeated\nstop-outs on the same direction (e.g., three short entries on\nhigh RSI in an uptrend).\n\n**Prevention**: `classify_rsi_regime()` returns STRONG_TREND or\nEARLY_TREND → block all RSI reversal entries.\n\n---\n\n### RFM-2: Divergence in Continuation\n\n**Description**: Bearish\u002Fbullish RSI divergence fires in a strong\ntrend as a \"normal\" consolidation pause rather than a genuine\nexhaustion. Price pauses, RSI pulls back slightly (creating\ndivergence structure), then the trend resumes with a large move\nagainst the divergence trade.\n\n**Identification**: Divergence was valid structurally but the ADX\nremained above 30 throughout, or HH\u002FHL count was below 6\n(trend not yet mature). The divergence was a mid-trend pause,\nnot an exhaustion signal.\n\n**Prevention**: Only permit divergence entries when\n`hh_hl_count >= 7` AND `adx_14 \u003C 40` (strong but not\nacceleration phase). ADX > 40 indicates active acceleration —\nno divergence is reliable at acceleration phase.\n\n```python\nMAX_ADX_FOR_DIVERGENCE = 40.0   # above this, trend is accelerating; divergence unreliable\nMIN_HH_HL_FOR_DIVERGENCE = 7    # below this, trend not mature enough for exhaustion signal\n```\n\n---\n\n### RFM-3: Cascade Reversal Trap\n\n**Description**: A liquidation cascade drives RSI to extreme oversold\n(\u003C 20) levels rapidly. The extreme RSI reading looks like a textbook\nreversal setup. An entry is taken, but price continues down as the\ncascade proceeds through further liquidation levels.\n\n**Identification**: RSI dropped from > 50 to \u003C 25 within 3-5 candles\n(cascade speed, not organic selling). OI dropped simultaneously\n(liquidations, not shorts being established). Cascade score ≥ 5\nat or before entry.\n\n**Prevention**: `cascade_score >= 5` → block all RSI entries in\n`classify_rsi_regime()`. Wait for cascade score to fall below 3\nand OI to stabilise before re-evaluating RSI signals.\n\n---\n\n### RFM-4: Funding Bleed on Range Longs\n\n**Description**: RSI oversold range long taken with elevated funding.\nThe trade is directionally correct (price does bounce from range low)\nbut the carry cost on the long side erodes the net profit, converting\na nominal win into a breakeven or small loss. Repeated applications\ncumulatively destroy edge even when price prediction is accurate.\n\n**Identification**: Post-trade review shows positive price move but\nnegative or zero net PnL. Funding rate was > 0.020% per hour at\nentry and sustained throughout.\n\n**Prevention**: `funding_ok` check in `evaluate_rsi_level_signal()`\nblocks long entries when `funding_1h_pct > 0.020%`. RSI range longs\nin elevated funding are not valid setups regardless of price action.\n\n---\n\n## Coordination with EMA Cross Signals\n\nRSI reversals and EMA cross signals have **opposing regime requirements**.\nConflicts must be resolved before any position is sized:\n\n```python\ndef coordinate_rsi_ema_signals(\n    rsi_signal: dict,    # from evaluate_rsi_level_signal() or evaluate_rsi_divergence()\n    ema_signal: dict,    # from ema-cross-failure-modes pre-entry filter\n    regime: dict,        # from classify_rsi_regime()\n) -> dict:\n    \"\"\"\n    Resolve conflicts between RSI reversal and EMA cross signals.\n    Returns the permitted signal type (if any) and the resolution.\n    \"\"\"\n    rsi_valid = rsi_signal.get(\"signal_valid\") or rsi_signal.get(\"divergence_valid\", False)\n    ema_valid = ema_signal.get(\"entry_permitted\", False)\n\n    # Both valid simultaneously: regime conflict\n    if rsi_valid and ema_valid:\n        # Prefer EMA cross in transitional regimes (trend taking over)\n        # Prefer RSI in confirmed ranging (ADX \u003C 20)\n        if regime[\"regime\"] == \"RANGING\":\n            return {\n                \"permitted_signal\": \"RSI\",\n                \"resolution\": \"Confirmed ranging: RSI reversal preferred over EMA cross.\",\n            }\n        else:\n            return {\n                \"permitted_signal\": \"EMA\",\n                \"resolution\": \"Non-ranging regime: EMA cross preferred; RSI signal suppressed.\",\n            }\n\n    if rsi_valid and not ema_valid:\n        return {\"permitted_signal\": \"RSI\", \"resolution\": \"Only RSI signal valid.\"}\n\n    if ema_valid and not rsi_valid:\n        return {\"permitted_signal\": \"EMA\", \"resolution\": \"Only EMA signal valid.\"}\n\n    return {\"permitted_signal\": None, \"resolution\": \"No valid signal from either system.\"}\n```\n\n**Conflict resolution rule**: In a ranging market, RSI wins. In any\nnon-ranging market (ADX ≥ 20), EMA wins. Never hold simultaneous\nRSI reversal and EMA trend positions on the same asset.\n\n---\n\n## RSI Period and Threshold Calibration\n\nDefault RSI-14 with 70\u002F30 thresholds is a starting point, not a\nuniversal truth. Calibrate to the asset and timeframe:\n\n| Asset Volatility | Timeframe | Recommended RSI Period | OB\u002FOS Thresholds | Rationale |\n|---|---|---|---|---|\n| High (BTC, ETH) | 15m | RSI-9 | 75 \u002F 25 | Faster signals needed; tight thresholds reduce false signals on volatile candles |\n| High (BTC, ETH) | 1H | RSI-14 | 70 \u002F 30 | Standard; well-validated |\n| High (BTC, ETH) | 4H | RSI-21 | 68 \u002F 32 | Slower timeframe: wider thresholds reduce whipsaw |\n| High-beta alts | 1H | RSI-14 | 75 \u002F 25 | High-beta assets reach extreme RSI more easily; raise thresholds |\n| High-beta alts | 4H | RSI-21 | 72 \u002F 28 | Same rationale; slower period |\n\n---\n\n## Position Sizing Override for RSI Reversals\n\nRSI reversal trades in ranging markets carry a specific sizing\nconstraint distinct from Kelly-optimal sizing:\n\n```python\nRSI_REVERSAL_KELLY_MULTIPLIER_CAP = 0.25   # never exceed quarter Kelly\n# Rationale: RSI reversals have lower average RR ratio (typically 1.5:1)\n# than trend-following entries (typically 2:1 or better).\n# Lower RR means Kelly optimal fraction is lower; quarter Kelly cap\n# prevents oversizing on trades with structurally lower edge.\n\nRSI_REVERSAL_MAX_CONCURRENT = 2   # max simultaneous RSI reversal positions\n# Rationale: RSI reversal trades on different assets in the same\n# ranging regime are often correlated (broad market ranging). Two\n# simultaneous RSI reversal positions is the practical maximum before\n# correlated stop-out risk becomes unacceptable.\n```\n\n---\n\n## Worked Example — Divergence Entry in Mature Trend\n\n```\nAsset: BTC-PERP, 4H timeframe\nSignal: Bearish RSI divergence (price new high, RSI lower high)\nTimestamp: 2026-04-07T12:00Z\n\nRegime classification inputs:\n  ADX_14:         32.1    (trending but not strong_trend > 35)\n  BB_width:       2.3%    (median 1.9%, ratio 1.21 — expanded)\n  HH_HL_count:    8       (mature trend >= 7: MATURE_TREND)\n  Cascade score:  1       (normal)\n\nRegime: MATURE_TREND\n  rsi_reversal_permitted: False\n  divergence_permitted:   True\n\nDivergence evaluation:\n  price_swing_1:  $87,200  (previous high)\n  price_swing_2:  $88,500  (new price high — higher high)\n  rsi_swing_1:    74.2     (RSI at previous high)\n  rsi_swing_2:    68.8     (RSI at new price high — lower RSI high)\n  divergence_type: bearish\n  candles_between: 18      (within 5-50 range)\n  volume_swing_2:  $1.2B   (20p avg $1.6B — declining: 0.75x)\n\n  price_diverges:    True  ($88,500 > $87,200: higher high)\n  rsi_diverges:      True  (68.8 \u003C 74.2: lower RSI high)\n  time_ok:           True  (18 candles)\n  volume_declining:  True  ($1.2B \u003C $1.6B * 0.85 = $1.36B)\n\nDivergence result: VALID\n\nADX check: 32.1 \u003C MAX_ADX_FOR_DIVERGENCE=40 ✔\nHH\u002FHL check: 8 >= MIN_HH_HL=7 ✔\n\nAdditional checks:\n  Cascade score:  1   (\u003C 5) ✔\n  Funding 1h:     -0.005% (slightly negative — no carry concern for short) ✔\n\nDecision: DIVERGENCE ENTRY PERMITTED (BTC short, 4H)\nSizing: Kelly quarter (0.25 multiplier cap for RSI\u002Fdivergence entries)\nSL: Above swing_2 high + 0.5× ATR\nTP: Previous swing high minus ATR (1.5:1 RR minimum)\n```\n\n---\n\n## Audit JSONL Schema\n\n```json\n{\n  \"event\": \"rsi_signal_evaluation\",\n  \"timestamp_utc\": \"2026-04-07T12:00:00Z\",\n  \"asset\": \"BTC\",\n  \"timeframe\": \"4H\",\n  \"signal_type\": \"RSI_DIVERGENCE\",\n  \"direction\": \"short\",\n  \"signal_valid\": true,\n  \"regime\": \"MATURE_TREND\",\n  \"rsi_reversal_permitted\": false,\n  \"divergence_permitted\": true,\n  \"adx_14\": 32.1,\n  \"hh_hl_count\": 8,\n  \"cascade_score\": 1,\n  \"rsi_swing_1\": 74.2,\n  \"rsi_swing_2\": 68.8,\n  \"price_swing_1\": 87200,\n  \"price_swing_2\": 88500,\n  \"candles_between_swings\": 18,\n  \"volume_declining\": true,\n  \"funding_1h_pct\": -0.005,\n  \"kelly_multiplier_cap\": 0.25,\n  \"reason\": \"Bearish divergence confirmed in mature trend. All checks passed.\"\n}\n```\n\n---\n\n## Integration with Other Skills\n\n- **`ema-cross-failure-modes`** (strategy\u002F): `coordinate_rsi_ema_signals()`\n  resolves conflicts when both strategy systems produce signals\n  simultaneously. RSI wins in confirmed ranging (ADX \u003C 20);\n  EMA wins in all other regimes. The two skills share ADX and\n  RSI inputs — compute once and pass to both.\n- **`trending-bull-entry-timing`** (regime-detection\u002F): Provides\n  `hh_hl_count` used in `classify_rsi_regime()` (mature trend\n  gate) and `evaluate_rsi_divergence()` (minimum leg count for\n  valid divergence).\n- **`liquidation-cascade-risk`** (regime-detection\u002F): `cascade_score`\n  is a hard block in `classify_rsi_regime()`. Any cascade score\n  >= 5 prevents all RSI entries regardless of other regime\n  conditions.\n- **`high-funding-carry-avoidance`** (regime-detection\u002F): `funding_1h_pct`\n  used in `evaluate_rsi_level_signal()` to block crowded long\n  range entries. Also feeds RFM-4 prevention.\n- **`kelly-position-sizing-perps`** (risk\u002F): RSI reversal entries\n  are capped at `RSI_REVERSAL_KELLY_MULTIPLIER_CAP = 0.25`\n  regardless of the Kelly formula output. Pass this as the\n  `kelly_multiplier` ceiling when sizing RSI reversal trades.\n- **`max-concurrent-positions`** (risk\u002F): RSI reversal trades\n  are subject to `RSI_REVERSAL_MAX_CONCURRENT = 2`. Track\n  active RSI reversal positions separately from trend positions.\n\n---\n\n## Quick Decision Tree\n\n```\nRSI signal fires (overbought, oversold, or divergence observed):\n│\n├── 1. Classify regime (run in parallel with regime inputs):\n│     trending-bull-entry-timing  → hh_hl_count\n│     liquidation-cascade-risk    → cascade_score\n│     regime = classify_rsi_regime(adx, bb_width, hh_hl_count,\n│                                    atr, cascade_score)\n│\n├── 2. Route by signal type:\n│   ├── Level signal (RSI \u003C 30 or > 70):\n│   │     regime.rsi_reversal_permitted? → No → SKIP signal\n│   │     evaluate_rsi_level_signal()\n│   │     signal_valid? → No → SKIP signal\n│   └── Divergence signal:\n│         regime.divergence_permitted? → No → SKIP signal\n│         adx \u003C 40 AND hh_hl_count >= 7? → No → SKIP signal\n│         evaluate_rsi_divergence()\n│         divergence_valid? → No → SKIP signal\n│\n├── 3. Coordinate with EMA signals:\n│     Any active EMA cross signal on same asset?\n│     coordinate_rsi_ema_signals() → resolve conflict\n│\n├── 4. Signal valid and no conflict:\n│     Kelly sizing with multiplier capped at 0.25\n│     → max-concurrent-positions (RSI reversal count ≤ 2)\n│     → slippage-budget-enforcement → order submission\n│\n└── 5. On position close (if loss):\n      Classify failure mode: RFM-1, RFM-2, RFM-3, or RFM-4\n      Log to audit. Update rolling failure frequency.\n```\n","# RSI Reversal Regime Dependency\n\n## When This Skill Activates\n\nApply this skill:\n\n- Before acting on any RSI overbought (> 70) or oversold (\u003C 30)\n  reversal signal on HyperLiquid perpetuals\n- When RSI divergence (price makes new high\u002Flow but RSI does not)\n  is observed and a reversal entry is being considered\n- When a mean-reversion or fade strategy is being evaluated for\n  a trending asset — RSI is the most common source of premature\n  fade entries in trending markets\n- When coordinating RSI signals with EMA cross signals in the same\n  session — the two strategy types have opposing regime requirements\n  and must not generate conflicting simultaneous positions\n- When classifying a post-trade loss from a reversal strategy to\n  determine whether regime filters should be tightened\n\n---\n\n## Core Principle: RSI Is a Regime-Conditional Indicator\n\nRSI does not measure absolute overbought or oversold conditions.\nIt measures the *speed and magnitude of recent price changes*\nrelative to the lookback period. In a strong trend, RSI can remain\nabove 70 for extended periods — this is not an error, it is the\nexpected output of a fast-moving trending market.\n\n**The fundamental regime split:**\n\n| Regime | RSI Behavior | RSI Signal Validity | Strategy Action |\n|---|---|---|---|\n| Ranging \u002F mean-reverting | RSI oscillates 30-70, reverts quickly | High — oversold\u002Foverbought are actionable | RSI reversals valid |\n| Trending (established) | RSI holds 60-85 (bull) or 15-40 (bear) | Low — readings are regime artifacts | RSI reversals invalid; use EMA cross |\n| Trending (mature\u002Fexhaustion) | RSI diverges from price at extremes | Medium — divergence only, not level | RSI divergence entries valid with confirmation |\n| Post-cascade \u002F high fragility | RSI collapses then bounces rapidly | Very low — cascade-driven distortion | No RSI entries during cascade |\n\n> **Rule**: Never fade an RSI extreme in a trending market.\n> An RSI reading of 78 in an established uptrend is not\n> overbought — it is confirmation the trend is strong.\n> The same reading in a ranging market is a valid short setup.\n\n---\n\n## Regime Classification for RSI Signals\n\n```python\ndef classify_rsi_regime(\n    adx_14: float,\n    bb_width_pct: float,\n    bb_width_20p_median: float,\n    hh_hl_count: int,             # from trending-bull-entry-timing\n    atr_current: float,\n    atr_20p_median: float,\n    cascade_score: int,           # from liquidation-cascade-risk\n) -> dict:\n    \"\"\"\n    Classify the current regime for RSI signal validity.\n    Returns regime class and whether RSI reversal signals are\n    permitted, divergence-only, or fully blocked.\n    \"\"\"\n    # Cascade override: always block during cascade\n    if cascade_score >= 5:\n        return {\n            \"regime\": \"CASCADE\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": False,\n            \"reason\": f\"Cascade score={cascade_score} >= 5. No RSI entries during cascade.\",\n        }\n\n    trending     = adx_14 >= 25.0\n    strong_trend = adx_14 >= 35.0\n    mature_trend = hh_hl_count >= 7\n    ranging      = adx_14 \u003C 20.0 and bb_width_pct \u003C= bb_width_20p_median * 1.10\n    compressed   = bb_width_pct \u003C bb_width_20p_median * 0.75  # pre-breakout\n\n    if strong_trend and not mature_trend:\n        return {\n            \"regime\": \"STRONG_TREND\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": False,\n            \"reason\": f\"ADX={adx_14:.1f} >= 35 (strong trend). RSI extremes are \"\n                      \"regime artifacts, not reversal signals. Use EMA cross instead.\",\n        }\n\n    if trending and mature_trend:\n        return {\n            \"regime\": \"MATURE_TREND\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": True,   # divergence only\n            \"reason\": f\"ADX={adx_14:.1f}, HH\u002FHL_count={hh_hl_count} >= 7. \"\n                      \"Trend mature: reversal entries require RSI divergence confirmation.\",\n        }\n\n    if trending and not mature_trend:\n        return {\n            \"regime\": \"EARLY_TREND\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": False,\n            \"reason\": f\"ADX={adx_14:.1f} trend established but not mature. \"\n                      \"RSI reversals invalid. Wait for ranging regime.\",\n        }\n\n    if compressed:\n        return {\n            \"regime\": \"COMPRESSION\",\n            \"rsi_reversal_permitted\": False,\n            \"divergence_permitted\": False,\n            \"reason\": \"BB width compressed below 75% of median. Pre-breakout compression: \"\n                      \"RSI signals unreliable before directional resolution.\",\n        }\n\n    if ranging:\n        return {\n            \"regime\": \"RANGING\",\n            \"rsi_reversal_permitted\": True,\n            \"divergence_permitted\": True,\n            \"reason\": f\"ADX={adx_14:.1f} \u003C 20, BB width within median. \"\n                      \"Ranging regime: RSI reversals valid with confirmation.\",\n        }\n\n    # Transitional \u002F ambiguous regime\n    return {\n        \"regime\": \"TRANSITIONAL\",\n        \"rsi_reversal_permitted\": False,\n        \"divergence_permitted\": False,\n        \"reason\": f\"ADX={adx_14:.1f} transitional (20-25). Regime ambiguous: \"\n                  \"wait for confirmation before RSI entries.\",\n    }\n```\n\n---\n\n## RSI Signal Types and Requirements\n\n### Type 1: Level-Based Reversal (Ranging Regime Only)\n\nA simple RSI overbought (> 70) or oversold (\u003C 30) entry. Valid\n**only** in a confirmed ranging regime (ADX \u003C 20).\n\n```python\ndef evaluate_rsi_level_signal(\n    rsi_14: float,\n    direction: str,              # \"long\" (from oversold) or \"short\" (from overbought)\n    regime: dict,                # from classify_rsi_regime()\n    price: float,\n    range_high: float,           # resistance level of current range\n    range_low: float,            # support level of current range\n    funding_1h_pct: float,       # from high-funding-carry-avoidance\n) -> dict:\n    if not regime[\"rsi_reversal_permitted\"]:\n        return {\n            \"signal_valid\": False,\n            \"reason\": f\"Regime blocks RSI reversal: {regime['reason']}\",\n        }\n\n    # RSI threshold check\n    oversold_ok  = direction == \"long\"  and rsi_14 \u003C= 30.0\n    overbought_ok = direction == \"short\" and rsi_14 >= 70.0\n    rsi_level_ok = oversold_ok or overbought_ok\n\n    # Price at range boundary confirmation\n    if direction == \"long\":\n        at_range_boundary = price \u003C= range_low * 1.005   # within 0.5% of support\n    else:\n        at_range_boundary = price >= range_high * 0.995  # within 0.5% of resistance\n\n    # Funding check for longs (crowded long at range low is fragile)\n    funding_ok = not (direction == \"long\" and funding_1h_pct > 0.020)\n\n    signal_valid = rsi_level_ok and at_range_boundary and funding_ok\n    return {\n        \"signal_valid\":      signal_valid,\n        \"signal_type\":       \"RSI_LEVEL\",\n        \"rsi_14\":            rsi_14,\n        \"at_range_boundary\": at_range_boundary,\n        \"funding_ok\":        funding_ok,\n        \"reason\": (\n            \"RSI level signal confirmed.\" if signal_valid else\n            \"; \".join(filter(None, [\n                f\"RSI={rsi_14:.1f} not at threshold\" if not rsi_level_ok else None,\n                \"price not at range boundary\"         if not at_range_boundary else None,\n                f\"funding={funding_1h_pct:.3f}% crowded long\" if not funding_ok else None,\n            ]))\n        ),\n    }\n```\n\n### Type 2: RSI Divergence (Mature Trend or Ranging)\n\nBullish divergence: price makes a lower low but RSI makes a higher\nlow. Bearish divergence: price makes a higher high but RSI makes a\nlower high. More reliable than level-based entries; valid in mature\ntrends as a potential exhaustion signal.\n\n```python\ndef evaluate_rsi_divergence(\n    price_swing_1: float,        # older swing high\u002Flow\n    price_swing_2: float,        # newer swing high\u002Flow\n    rsi_swing_1: float,          # RSI at older swing\n    rsi_swing_2: float,          # RSI at newer swing\n    divergence_type: str,        # \"bullish\" or \"bearish\"\n    regime: dict,\n    candles_between_swings: int, # time between swings (validity window)\n    volume_at_swing_2: float,\n    volume_20p_avg: float,\n) -> dict:\n    if not regime[\"divergence_permitted\"]:\n        return {\n            \"divergence_valid\": False,\n            \"reason\": f\"Regime does not permit divergence entries: {regime['reason']}\",\n        }\n\n    # Validate divergence structure\n    if divergence_type == \"bullish\":\n        price_diverges = price_swing_2 \u003C price_swing_1   # lower low in price\n        rsi_diverges   = rsi_swing_2   > rsi_swing_1     # higher low in RSI\n    else:\n        price_diverges = price_swing_2 > price_swing_1   # higher high in price\n        rsi_diverges   = rsi_swing_2   \u003C rsi_swing_1     # lower high in RSI\n\n    structure_ok = price_diverges and rsi_diverges\n\n    # Time validity: swings too close = noise; too far = stale divergence\n    time_ok = 5 \u003C= candles_between_swings \u003C= 50\n\n    # Volume confirmation: second swing should have lower volume\n    # (exhaustion) for divergence to be meaningful\n    volume_declining = volume_at_swing_2 \u003C volume_20p_avg * 0.85\n\n    divergence_valid = structure_ok and time_ok and volume_declining\n    return {\n        \"divergence_valid\":    divergence_valid,\n        \"signal_type\":         \"RSI_DIVERGENCE\",\n        \"divergence_type\":     divergence_type,\n        \"price_diverges\":      price_diverges,\n        \"rsi_diverges\":        rsi_diverges,\n        \"time_ok\":             time_ok,\n        \"volume_declining\":    volume_declining,\n        \"candles_between\":     candles_between_swings,\n        \"reason\": (\n            f\"{divergence_type.capitalize()} divergence confirmed.\" if divergence_valid else\n            \"; \".join(filter(None, [\n                \"No divergence structure\"          if not structure_ok else None,\n                f\"{candles_between_swings} candles between swings (req 5-50)\" if not time_ok else None,\n                \"Volume not declining at swing 2\"  if not volume_declining else None,\n            ]))\n        ),\n    }\n```\n\n---\n\n## RSI Failure Modes Specific to Perpetuals\n\n### RFM-1: Trend Fade Loss\n\n**Description**: RSI overbought\u002Foversold signal taken in a trending\nmarket. The trend continues, RSI remains elevated\u002Fdepressed for\nextended periods, and the position is stopped out multiple times\nas the trader repeatedly fades the trend.\n\n**Identification**: ADX ≥ 25 at entry. Loss came from repeated\nstop-outs on the same direction (e.g., three short entries on\nhigh RSI in an uptrend).\n\n**Prevention**: `classify_rsi_regime()` returns STRONG_TREND or\nEARLY_TREND → block all RSI reversal entries.\n\n---\n\n### RFM-2: Divergence in Continuation\n\n**Description**: Bearish\u002Fbullish RSI divergence fires in a strong\ntrend as a \"normal\" consolidation pause rather than a genuine\nexhaustion. Price pauses, RSI pulls back slightly (creating\ndivergence structure), then the trend resumes with a large move\nagainst the divergence trade.\n\n**Identification**: Divergence was valid structurally but the ADX\nremained above 30 throughout, or HH\u002FHL count was below 6\n(trend not yet mature). The divergence was a mid-trend pause,\nnot an exhaustion signal.\n\n**Prevention**: Only permit divergence entries when\n`hh_hl_count >= 7` AND `adx_14 \u003C 40` (strong but not\nacceleration phase). ADX > 40 indicates active acceleration —\nno divergence is reliable at acceleration phase.\n\n```python\nMAX_ADX_FOR_DIVERGENCE = 40.0   # above this, trend is accelerating; divergence unreliable\nMIN_HH_HL_FOR_DIVERGENCE = 7    # below this, trend not mature enough for exhaustion signal\n```\n\n---\n\n### RFM-3: Cascade Reversal Trap\n\n**Description**: A liquidation cascade drives RSI to extreme oversold\n(\u003C 20) levels rapidly. The extreme RSI reading looks like a textbook\nreversal setup. An entry is taken, but price continues down as the\ncascade proceeds through further liquidation levels.\n\n**Identification**: RSI dropped from > 50 to \u003C 25 within 3-5 candles\n(cascade speed, not organic selling). OI dropped simultaneously\n(liquidations, not shorts being established). Cascade score ≥ 5\nat or before entry.\n\n**Prevention**: `cascade_score >= 5` → block all RSI entries in\n`classify_rsi_regime()`. Wait for cascade score to fall below 3\nand OI to stabilise before re-evaluating RSI signals.\n\n---\n\n### RFM-4: Funding Bleed on Range Longs\n\n**Description**: RSI oversold range long taken with elevated funding.\nThe trade is directionally correct (price does bounce from range low)\nbut the carry cost on the long side erodes the net profit, converting\na nominal win into a breakeven or small loss. Repeated applications\ncumulatively destroy edge even when price prediction is accurate.\n\n**Identification**: Post-trade review shows positive price move but\nnegative or zero net PnL. Funding rate was > 0.020% per hour at\nentry and sustained throughout.\n\n**Prevention**: `funding_ok` check in `evaluate_rsi_level_signal()`\nblocks long entries when `funding_1h_pct > 0.020%`. RSI range longs\nin elevated funding are not valid setups regardless of price action.\n\n---\n\n## Coordination with EMA Cross Signals\n\nRSI reversals and EMA cross signals have **opposing regime requirements**.\nConflicts must be resolved before any position is sized:\n\n```python\ndef coordinate_rsi_ema_signals(\n    rsi_signal: dict,    # from evaluate_rsi_level_signal() or evaluate_rsi_divergence()\n    ema_signal: dict,    # from ema-cross-failure-modes pre-entry filter\n    regime: dict,        # from classify_rsi_regime()\n) -> dict:\n    \"\"\"\n    Resolve conflicts between RSI reversal and EMA cross signals.\n    Returns the permitted signal type (if any) and the resolution.\n    \"\"\"\n    rsi_valid = rsi_signal.get(\"signal_valid\") or rsi_signal.get(\"divergence_valid\", False)\n    ema_valid = ema_signal.get(\"entry_permitted\", False)\n\n    # Both valid simultaneously: regime conflict\n    if rsi_valid and ema_valid:\n        # Prefer EMA cross in transitional regimes (trend taking over)\n        # Prefer RSI in confirmed ranging (ADX \u003C 20)\n        if regime[\"regime\"] == \"RANGING\":\n            return {\n                \"permitted_signal\": \"RSI\",\n                \"resolution\": \"Confirmed ranging: RSI reversal preferred over EMA cross.\",\n            }\n        else:\n            return {\n                \"permitted_signal\": \"EMA\",\n                \"resolution\": \"Non-ranging regime: EMA cross preferred; RSI signal suppressed.\",\n            }\n\n    if rsi_valid and not ema_valid:\n        return {\"permitted_signal\": \"RSI\", \"resolution\": \"Only RSI signal valid.\"}\n\n    if ema_valid and not rsi_valid:\n        return {\"permitted_signal\": \"EMA\", \"resolution\": \"Only EMA signal valid.\"}\n\n    return {\"permitted_signal\": None, \"resolution\": \"No valid signal from either system.\"}\n```\n\n**Conflict resolution rule**: In a ranging market, RSI wins. In any\nnon-ranging market (ADX ≥ 20), EMA wins. Never hold simultaneous\nRSI reversal and EMA trend positions on the same asset.\n\n---\n\n## RSI Period and Threshold Calibration\n\nDefault RSI-14 with 70\u002F30 thresholds is a starting point, not a\nuniversal truth. Calibrate to the asset and timeframe:\n\n| Asset Volatility | Timeframe | Recommended RSI Period | OB\u002FOS Thresholds | Rationale |\n|---|---|---|---|---|\n| High (BTC, ETH) | 15m | RSI-9 | 75 \u002F 25 | Faster signals needed; tight thresholds reduce false signals on volatile candles |\n| High (BTC, ETH) | 1H | RSI-14 | 70 \u002F 30 | Standard; well-validated |\n| High (BTC, ETH) | 4H | RSI-21 | 68 \u002F 32 | Slower timeframe: wider thresholds reduce whipsaw |\n| High-beta alts | 1H | RSI-14 | 75 \u002F 25 | High-beta assets reach extreme RSI more easily; raise thresholds |\n| High-beta alts | 4H | RSI-21 | 72 \u002F 28 | Same rationale; slower period |\n\n---\n\n## Position Sizing Override for RSI Reversals\n\nRSI reversal trades in ranging markets carry a specific sizing\nconstraint distinct from Kelly-optimal sizing:\n\n```python\nRSI_REVERSAL_KELLY_MULTIPLIER_CAP = 0.25   # never exceed quarter Kelly\n# Rationale: RSI reversals have lower average RR ratio (typically 1.5:1)\n# than trend-following entries (typically 2:1 or better).\n# Lower RR means Kelly optimal fraction is lower; quarter Kelly cap\n# prevents oversizing on trades with structurally lower edge.\n\nRSI_REVERSAL_MAX_CONCURRENT = 2   # max simultaneous RSI reversal positions\n# Rationale: RSI reversal trades on different assets in the same\n# ranging regime are often correlated (broad market ranging). Two\n# simultaneous RSI reversal positions is the practical maximum before\n# correlated stop-out risk becomes unacceptable.\n```\n\n---\n\n## Worked Example — Divergence Entry in Mature Trend\n\n```\nAsset: BTC-PERP, 4H timeframe\nSignal: Bearish RSI divergence (price new high, RSI lower high)\nTimestamp: 2026-04-07T12:00Z\n\nRegime classification inputs:\n  ADX_14:         32.1    (trending but not strong_trend > 35)\n  BB_width:       2.3%    (median 1.9%, ratio 1.21 — expanded)\n  HH_HL_count:    8       (mature trend >= 7: MATURE_TREND)\n  Cascade score:  1       (normal)\n\nRegime: MATURE_TREND\n  rsi_reversal_permitted: False\n  divergence_permitted:   True\n\nDivergence evaluation:\n  price_swing_1:  $87,200  (previous high)\n  price_swing_2:  $88,500  (new price high — higher high)\n  rsi_swing_1:    74.2     (RSI at previous high)\n  rsi_swing_2:    68.8     (RSI at new price high — lower RSI high)\n  divergence_type: bearish\n  candles_between: 18      (within 5-50 range)\n  volume_swing_2:  $1.2B   (20p avg $1.6B — declining: 0.75x)\n\n  price_diverges:    True  ($88,500 > $87,200: higher high)\n  rsi_diverges:      True  (68.8 \u003C 74.2: lower RSI high)\n  time_ok:           True  (18 candles)\n  volume_declining:  True  ($1.2B \u003C $1.6B * 0.85 = $1.36B)\n\nDivergence result: VALID\n\nADX check: 32.1 \u003C MAX_ADX_FOR_DIVERGENCE=40 ✔\nHH\u002FHL check: 8 >= MIN_HH_HL=7 ✔\n\nAdditional checks:\n  Cascade score:  1   (\u003C 5) ✔\n  Funding 1h:     -0.005% (slightly negative — no carry concern for short) ✔\n\nDecision: DIVERGENCE ENTRY PERMITTED (BTC short, 4H)\nSizing: Kelly quarter (0.25 multiplier cap for RSI\u002Fdivergence entries)\nSL: Above swing_2 high + 0.5× ATR\nTP: Previous swing high minus ATR (1.5:1 RR minimum)\n```\n\n---\n\n## Audit JSONL Schema\n\n```json\n{\n  \"event\": \"rsi_signal_evaluation\",\n  \"timestamp_utc\": \"2026-04-07T12:00:00Z\",\n  \"asset\": \"BTC\",\n  \"timeframe\": \"4H\",\n  \"signal_type\": \"RSI_DIVERGENCE\",\n  \"direction\": \"short\",\n  \"signal_valid\": true,\n  \"regime\": \"MATURE_TREND\",\n  \"rsi_reversal_permitted\": false,\n  \"divergence_permitted\": true,\n  \"adx_14\": 32.1,\n  \"hh_hl_count\": 8,\n  \"cascade_score\": 1,\n  \"rsi_swing_1\": 74.2,\n  \"rsi_swing_2\": 68.8,\n  \"price_swing_1\": 87200,\n  \"price_swing_2\": 88500,\n  \"candles_between_swings\": 18,\n  \"volume_declining\": true,\n  \"funding_1h_pct\": -0.005,\n  \"kelly_multiplier_cap\": 0.25,\n  \"reason\": \"Bearish divergence confirmed in mature trend. All checks passed.\"\n}\n```\n\n---\n\n## Integration with Other Skills\n\n- **`ema-cross-failure-modes`** (strategy\u002F): `coordinate_rsi_ema_signals()`\n  resolves conflicts when both strategy systems produce signals\n  simultaneously. RSI wins in confirmed ranging (ADX \u003C 20);\n  EMA wins in all other regimes. The two skills share ADX and\n  RSI inputs — compute once and pass to both.\n- **`trending-bull-entry-timing`** (regime-detection\u002F): Provides\n  `hh_hl_count` used in `classify_rsi_regime()` (mature trend\n  gate) and `evaluate_rsi_divergence()` (minimum leg count for\n  valid divergence).\n- **`liquidation-cascade-risk`** (regime-detection\u002F): `cascade_score`\n  is a hard block in `classify_rsi_regime()`. Any cascade score\n  >= 5 prevents all RSI entries regardless of other regime\n  conditions.\n- **`high-funding-carry-avoidance`** (regime-detection\u002F): `funding_1h_pct`\n  used in `evaluate_rsi_level_signal()` to block crowded long\n  range entries. Also feeds RFM-4 prevention.\n- **`kelly-position-sizing-perps`** (risk\u002F): RSI reversal entries\n  are capped at `RSI_REVERSAL_KELLY_MULTIPLIER_CAP = 0.25`\n  regardless of the Kelly formula output. Pass this as the\n  `kelly_multiplier` ceiling when sizing RSI reversal trades.\n- **`max-concurrent-positions`** (risk\u002F): RSI reversal trades\n  are subject to `RSI_REVERSAL_MAX_CONCURRENT = 2`. Track\n  active RSI reversal positions separately from trend positions.\n\n---\n\n## Quick Decision Tree\n\n```\nRSI signal fires (overbought, oversold, or divergence observed):\n│\n├── 1. Classify regime (run in parallel with regime inputs):\n│     trending-bull-entry-timing  → hh_hl_count\n│     liquidation-cascade-risk    → cascade_score\n│     regime = classify_rsi_regime(adx, bb_width, hh_hl_count,\n│                                    atr, cascade_score)\n│\n├── 2. Route by signal type:\n│   ├── Level signal (RSI \u003C 30 or > 70):\n│   │     regime.rsi_reversal_permitted? → No → SKIP signal\n│   │     evaluate_rsi_level_signal()\n│   │     signal_valid? → No → SKIP signal\n│   └── Divergence signal:\n│         regime.divergence_permitted? → No → SKIP signal\n│         adx \u003C 40 AND hh_hl_count >= 7? → No → SKIP signal\n│         evaluate_rsi_divergence()\n│         divergence_valid? → No → SKIP signal\n│\n├── 3. Coordinate with EMA signals:\n│     Any active EMA cross signal on same asset?\n│     coordinate_rsi_ema_signals() → resolve conflict\n│\n├── 4. Signal valid and no conflict:\n│     Kelly sizing with multiplier capped at 0.25\n│     → max-concurrent-positions (RSI reversal count ≤ 2)\n│     → slippage-budget-enforcement → order submission\n│\n└── 5. On position close (if loss):\n      Classify failure mode: RFM-1, RFM-2, RFM-3, or RFM-4\n      Log to audit. Update rolling failure frequency.\n```\n",{"name":5,"category":31,"description":7},"main","bfe4e4653cba696a8dc20f70c6006651b997fdef","migrate-hyperliquid-firm\u002Fmulticlaw\u002Fmetaclaw\u002Fskills\u002Fstrategy\u002Frsi-reversal-regime-dependency",0,"https:\u002F\u002Fgithub.com\u002Fenuno\u002Fcrewless-capital","https:\u002F\u002Fgithub.com\u002Fenuno","https:\u002F\u002Fenuno.github.io\u002FDynamicCareerCanvas","Digital Nomad, Blockchain Evangel, and Digital Solutions Architect. \r\nCreator of TerraHash Stack.\r\nCEO of Ryno Crypto Mining Services.","2026-07-02 10:49:15",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add enuno\u002Fcrewless-capital --skill rsi-reversal-regime-dependency",{"tool":59,"command":60},"bunx","bunx skills add enuno\u002Fcrewless-capital --skill rsi-reversal-regime-dependency",{"tool":62,"command":63},"pnpm","pnpm dlx skills add enuno\u002Fcrewless-capital --skill rsi-reversal-regime-dependency","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fenuno\u002Fcrewless-capital\u002Fblob\u002Fmain\u002Fmigrate-hyperliquid-firm\u002Fmulticlaw\u002Fmetaclaw\u002Fskills\u002Fstrategy\u002Frsi-reversal-regime-dependency\u002FSKILL.md",true,[],[68,98,125,150,175,195],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":79,"publishedAt":39},"01M6X94YFR1XNANZ321FS661NG","supermemory","Supermemory is a state-of-the-art memory and context infrastructure for AI agents. Use this skill when building applications that need persistent memory, user personalization, long-term context retention, or semantic search across knowledge bases. It provides Memory API for learned user context, User Profiles for static\u002Fdynamic facts, and RAG for semantic search. Perfect for chatbots, assistants, and knowledge-intensive applications.","https:\u002F\u002Fgithub.com\u002Fenuno\u002Fcrewless-capital\u002Fblob\u002Fmain\u002Fmigrate-hyperliquid-firm\u002Fskills\u002Fsupermemory\u002FSKILL.md",[74],{"categoryNo":75,"categoryName":76,"taxonomyType":77,"taxonomyTypeDesc":78},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[70,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,23],"ai agents","memory","rag","semantic search","infrastructure","search","applications","api","knowledge","context","Art","personalization","across","learned","retention","for","persistent memory","static",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":102,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":39},"01M6X94S3K97CSK7VFF5H85ED2","wolverine-strategy","WOLVERINE v2.0 — HYPE alpha hunter. Entry-only scanner, DSL-exit-only architecture. v1.1 lost -22.7% because the scanner's thesis exit chopped 25\u002F27 trades before DSL could manage them. v2.0 removes thesis exit entirely. Scanner decides entries (score 8+, 4H\u002F1H aligned, SM consensus). DSL manages all exits (wide Phase 1 for HYPE volatility, trailing tiers starting at +15% ROE). Leverage lowered to 7x. Max 4 entries\u002Fday. 3-hour cooldown between entries. DSL exit managed by plugin runtime via runtime.yaml.","MIT","https:\u002F\u002Fgithub.com\u002Fenuno\u002Fcrewless-capital\u002Fblob\u002Fmain\u002Fmigrate-hyperliquid-firm\u002Fskills\u002Fsenpi-skills\u002Fwolverine\u002FSKILL.md",[],[106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,95,122,123,124],"strategy","wolverine strategy","architecture","alpha","Volatility","consensus","only","trading","scanner","manage","max","hyperliquid","runtime","leverage","hunter","at","managed","dsl","phase",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":102,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":134,"publishedAt":39},"01M6X94HN3CHBM37GM2C84KT26","wolf-strategy","WOLF v6.3 — Fully autonomous multi-strategy trading for Hyperliquid perps via Senpi MCP. Manages multiple strategies simultaneously, each with independent wallets, budgets, slots, and DSL configs. 5+N cron architecture: 5 shared wolf crons (Emerging Movers 3min, SM Flip 5min, Watchdog 5min, Risk Guardian 5min, Health Check 10min) plus one DSL v5.2 cron per strategy (native Hyperliquid SL sync via dsl-dynamic-stop-loss skill v5.3.1). Same asset can be traded in different strategies simultaneously. Enter early on first jumps, not at confirmed peaks. Dynamic risk-based leverage per strategy. Requires Senpi MCP connection, python3, mcporter CLI, OpenClaw cron system, and dsl-dynamic-stop-loss skill (provides dsl-cli.py + dsl-v5.py).","https:\u002F\u002Fgithub.com\u002Fenuno\u002Fcrewless-capital\u002Fblob\u002Fmain\u002Fmigrate-hyperliquid-firm\u002Fskills\u002Fsenpi-skills\u002Fwolf-strategy\u002FSKILL.md",[131],{"categoryNo":132,"categoryName":133,"taxonomyType":77,"taxonomyTypeDesc":78},"01JBSEEDCAT000000000000023","Skill与智能体开发",[106,135,136,137,108,138,139,140,141,142,143,144,145,119,146,147,121,148,149,95],"wolf strategy","MCP","openclaw","health","system","python3","check","health check","stop","strategies","shared","connection","wallets","stop-loss","hyperliquid perps",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":102,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":157,"publishedAt":39},"01M6X949FBGWWGY3YZ8N3WB3CP","wolf-howl","HOWL v2 — Hunt, Optimize, Win, Learn. Nightly self-improvement loop for the WOLF autonomous trading strategy. Runs once per day (via cron) to review all trades from the last 24 hours, compute win rates, analyze signal quality correlation, evaluate DSL tier performance, identify missed opportunities, and produce concrete improvement suggestions for the wolf-strategy skill. v2 adds fee drag ratio (FDR) analysis, holding period bucketing, LONG vs SHORT regime detection, rotation cost tracking, cumulative drift detection, and gross vs net profit factor separation. Use when setting up daily trade review automation, analyzing trading performance, or improving an autonomous trading strategy through data-driven feedback loops. Requires Senpi MCP connection, mcporter CLI, and OpenClaw cron system.","https:\u002F\u002Fgithub.com\u002Fenuno\u002Fcrewless-capital\u002Fblob\u002Fmain\u002Fmigrate-hyperliquid-firm\u002Fskills\u002Fsenpi-skills\u002Fwolf-howl\u002FSKILL.md",[156],{"categoryNo":132,"categoryName":133,"taxonomyType":77,"taxonomyTypeDesc":78},[158,136,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,123,174,23],"wolf howl","review","performance","learn","analysis","loop","analyze","short","autonomous","up","optimize","drift","self","factor","loops","profit","fdr",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":39},"01M6X9437CQ55N5AYHCPF71JWG","whale-index","Auto-mirror top Discovery traders on Hyperliquid. Scans top 50 traders, scores on PnL rank (35%), win rate (25%), consistency (20%), hold time (10%), drawdown (10%). Creates 2-5 mirror strategies with overlap checks. Daily rebalance with 2-day watch period before swaps. Use when setting up trader mirroring, copy trading, or portfolio auto-rebalancing based on Discovery leaderboard performance.","https:\u002F\u002Fgithub.com\u002Fenuno\u002Fcrewless-capital\u002Fblob\u002Fmain\u002Fmigrate-hyperliquid-firm\u002Fskills\u002Fsenpi-skills\u002Fwhale-index\u002FSKILL.md",[],[182,183,184,160,185,186,187,33,188,167,189,190,144,26,191,192,193,95,194,23],"index","whale","whale index","auth","monitoring","discovery","auto","daily","time","consistency","top","mirror","pnl",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":102,"licenseFileUrl":6,"sourceHtmlUrl":199,"categories":200,"keywords":201,"publishedAt":39},"01M6X93YTRGNPYNHZRTW9XNH1E","vixen-strategy","VIXEN v1.0 — Dual-mode emerging movers scanner. Built from FOX v1.6 live trading data (+34.5% ROI). Two entry modes: STALKER (steady accumulation, score 6+, catches the SM buildup BEFORE the explosion) and STRIKER (violent FIRST_JUMP, score 9+, with raw volume confirmation to filter blow-off tops). 2-hour per-asset cooldown after Phase 1 exits. DSL High Water Mode mandatory.","https:\u002F\u002Fgithub.com\u002Fenuno\u002Fcrewless-capital\u002Fblob\u002Fmain\u002Fmigrate-hyperliquid-firm\u002Fskills\u002Fsenpi-skills\u002Fvixen\u002FSKILL.md",[],[106,202,203,204,205,34,114,206,28,207,26,208,209,210,211,25,212,213,123,124],"vixen strategy","roi","data","first","volume","asset","explosion","mode","high","v1","emerging movers","entry"]