[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M748EF62WBJRTNM2HCS2K27X":3,"skill-same:01M748EF62WBJRTNM2HCS2K27X":65},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":6,"updatedAt":40,"install":41,"resources":54},"01M748EF62WBJRTNM2HCS2K27X","coil-scan",null,"Daily scanner that finds stocks sitting in the \"bottom of the coil\" using a dual-timeframe Williams %R Trend Exhaustion indicator, then flags the ones that just triggered out. Silent data feed for Michael — he writes trade posts only when he likes a name. Use when the user asks about \"coil scan\", \"bottom of the coil\", \"what's coiled\", \"daily coil\", \"%R exhaustion scan\", \"what's oversold and turning\", or wants to find deeply oversold names that are just starting to reverse.","mphinance\u002Falpha-skills","mphinance","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F217996678?v=4","01M71VQC89A6CMFACD2J1CJW6E","Michael H","01M71VQC9B4C0BJ7XXKT8RWRV9",32,"MIT","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcoil-scan\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: coil-scan\ndescription: >-\n  Daily scanner that finds stocks sitting in the \"bottom of the coil\" using a\n  dual-timeframe Williams %R Trend Exhaustion indicator, then flags the ones\n  that just triggered out. Silent data feed for Michael — he writes trade posts\n  only when he likes a name.\n  Use when the user asks about \"coil scan\", \"bottom of the coil\",\n  \"what's coiled\", \"daily coil\", \"%R exhaustion scan\", \"what's oversold and\n  turning\", or wants to find deeply oversold names that are just starting to\n  reverse.\ntrigger_phrases:\n  - coil scan\n  - bottom of the coil\n  - what's coiled\n  - daily coil\n  - \"%R exhaustion scan\"\n  - what's oversold and turning\n  - rte scan\n  - williams %r coil\n---\n\n# Coil Scan — dual-timeframe %R Trend Exhaustion\n\nMirrors the **\"%R Trend Exhaustion [upslidedown]\"** TradingView indicator\n(dual timeframe 21 + 112).  Finds stocks that are *both* deeply oversold AND\njust starting to reverse.\n\n## The indicator math\n\n- **%R(n)** = Williams %R = `100 * (close - highestHigh_n) \u002F (highestHigh_n - lowestLow_n)`, range −100…0.\n- **Fast leg** = EMA(7) of %R(21).\n- **Slow leg** = EMA(3) of %R(112).\n- **Threshold (TH)** = −80.\n- **In the coil**: both fast AND slow ≤ −80.  The short-term AND the structural\n  picture are both deeply oversold.  This is the *stalk zone* — a name can sit\n  here for days\u002Fweeks before the trigger fires.\n- **Triggered out**: fast crossed back above −80 while it was recently (within\n  ~20 bars) coiled on both legs.  The slow leg still lagging confirms the\n  structural exhaustion hasn't reset — this is the bullish reversal signal.\n\n## Two output buckets\n\n### ⚡ TRIGGERED OUT (≤3 days ago)\nFast just crossed back above −80.  These are *actionable reversal candidates*.\n\nA **sanity check** filters false-positives:\n- If the close is already >5% above the price on the trigger date → tagged\n  **\"already ran — not fresh\"** and downranked.\n- If the close is now above EMA21 → same tag.\n\n*The canonical false-positive this catches: SLB crossed up but had already run\n+4% to just under its 21EMA by the time the scan ran — that's a chase, not an\nentry.  It lands in the sanity-filtered section, not the fresh list.*\n\n### 🟢 IN THE COIL (stalk candidates)\nBoth legs ≤ −80, no trigger yet.  Sorted deepest-first (most negative slow\nleg = most structurally exhausted).\n\nThe **days-in-coil** counter comes from the persistent state file\n(`state\u002Fcoil_watch.json`), so the scan can say \"IREN — day 6 in the coil.\"\nA name stays in the store until it triggers or exits the coil entirely.\n\n## Per-name display\n\n```\nSYM    fast%R   slow%R   depth    close   day-in-coil   vs SMA200  vs EMA21\nIREN    -92.3    -88.1   -8.1    $7.42   day 3          below SMA200  below EMA21\n```\n\n- **depth**: `min(fast, slow) − (−80)`.  Negative = deeper in the hole.\n- **above\u002Fbelow SMA200 + EMA21**: from live technicals endpoint.\n\n## How to run\n\nFrom the repo root or anywhere under it:\n\n```bash\npython .claude\u002Fskills\u002Fcoil-scan\u002Fscripts\u002Fcoil_scan.py\n```\n\nOptions:\n\n```bash\n# smoke test against a short list\npython coil_scan.py --universe IREN,RGTI,SMCI,SLB,FIG,GLD,ASTS\n\n# limit universe size\npython coil_scan.py --limit 50\n\n# write JSON output\npython coil_scan.py --json \u002Ftmp\u002Fcoil_2026-07-19.json\n\n# custom universe file (one ticker per line, or comma-separated)\npython coil_scan.py --universe \u002Ftmp\u002Fmy_watchlist.txt\n```\n\nUniverse defaults to: all live TDPro screeners + stock-recap persistent watch\nlist (falls back to the most recent `stock-recap\u002Fruns\u002F*\u002Fraw\u002Fscreener_*.json`\nif the live API is unavailable).  Aim: ~150–200 names.\n\n## Persistence\n\n`state\u002Fcoil_watch.json` is keyed by ticker and tracks:\n- `firstSeen` — date first seen in the coil\n- `daysInCoil` — rolling counter updated each run\n- `entryClose` \u002F `lastClose` — price anchors\n- `triggered` \u002F `triggerDate` — when the cross fired\n\nOn each run: newly-coiled names are added, existing names increment their\ncounter, triggered names are flagged, and names that left the coil without\ntriggering are dropped.\n\n## Data sources\n\n- **Bars**: `GET \u002Fapi\u002Fagent\u002Fticker\u002F{SYMBOL}\u002Fchart-data?days=365`\n  (TraderDaddy Pro Railway API; Bearer token from `.env_agent_api`).\n  Needs ≥115 bars for the slow %R(112) leg.\n- **Live technicals**: `GET \u002Fapi\u002Fagent\u002Fticker\u002F{SYMBOL}`\n  (close, ema21, sma200, atr, rsi — used for sanity check + display).\n- **Universe**: `GET \u002Fapi\u002Fscreeners` + `GET \u002Fapi\u002Fscreeners\u002F{id}\u002Frun` × 10.\n\n## Interpreting results for Michael\n\n- **Empty IN THE COIL list**: tape is not oversold broadly — that's fine,\n  nothing to stalk beats a list of knives.\n- **Triggered + already ran**: it moved without you.  Note it for the next\n  pullback but don't chase.\n- **Triggered fresh + below EMA21**: highest-quality entry zone.  Fast is\n  turning, structure is still washed out, price hasn't reclaimed the mean yet.\n- **In coil day 10+**: structural exhaustion is deep.  The longer it coils, the\n  more compressed the spring.  Watch for the fast leg to tick back above −80.\n\nThe scan is a *data layer* — Michael confirms setups on Ghost Flow (the %R\nEXHAUST panel is visible there) before sizing.\n\n## Trigger A\u002FB harness (`coil_ab.py`)\n\nA sibling script runs two trigger rules side by side so we can settle whether\ntightening the trigger helps:\n\n- **CURRENT** (`find_trigger`): both legs were ≤ −80, then fast crosses > −80.\n  Slow is *not* required to still be under −80 at the cross.\n- **STRICT**: fast crosses > −80 *while slow is still ≤ −80* at that same bar\n  (\"fast breaks while slow still under\"). A subset of CURRENT.\n\nA 2026-07-21 backtest found **STRICT is worse** — the crosses it drops (slow\nalready recovered = both legs lifting together = structural confirmation)\noutperformed at every horizon (3\u002F5\u002F10\u002F20d). Fast-leads-while-slow-buried is the\n*earlier but weaker* (knife) signal. So the harness is a live forward test to\nconfirm that before deciding.\n\n```bash\npython coil_ab.py            # log today's fresh triggers under both rules\npython coil_ab.py --report   # re-price the ledger, print STRICT vs CURRENT-ONLY\n```\n\nLedger: `state\u002Fab_ledger.json` (deduped per `symbol|trig_date`). Logs daily via\nweekday 22:00-UTC cron → `state\u002Fab_cron.log`. Core `coil_scan.py` is untouched.\n","# Coil Scan — dual-timeframe %R Trend Exhaustion\n\nMirrors the **\"%R Trend Exhaustion [upslidedown]\"** TradingView indicator\n(dual timeframe 21 + 112).  Finds stocks that are *both* deeply oversold AND\njust starting to reverse.\n\n## The indicator math\n\n- **%R(n)** = Williams %R = `100 * (close - highestHigh_n) \u002F (highestHigh_n - lowestLow_n)`, range −100…0.\n- **Fast leg** = EMA(7) of %R(21).\n- **Slow leg** = EMA(3) of %R(112).\n- **Threshold (TH)** = −80.\n- **In the coil**: both fast AND slow ≤ −80.  The short-term AND the structural\n  picture are both deeply oversold.  This is the *stalk zone* — a name can sit\n  here for days\u002Fweeks before the trigger fires.\n- **Triggered out**: fast crossed back above −80 while it was recently (within\n  ~20 bars) coiled on both legs.  The slow leg still lagging confirms the\n  structural exhaustion hasn't reset — this is the bullish reversal signal.\n\n## Two output buckets\n\n### ⚡ TRIGGERED OUT (≤3 days ago)\nFast just crossed back above −80.  These are *actionable reversal candidates*.\n\nA **sanity check** filters false-positives:\n- If the close is already >5% above the price on the trigger date → tagged\n  **\"already ran — not fresh\"** and downranked.\n- If the close is now above EMA21 → same tag.\n\n*The canonical false-positive this catches: SLB crossed up but had already run\n+4% to just under its 21EMA by the time the scan ran — that's a chase, not an\nentry.  It lands in the sanity-filtered section, not the fresh list.*\n\n### 🟢 IN THE COIL (stalk candidates)\nBoth legs ≤ −80, no trigger yet.  Sorted deepest-first (most negative slow\nleg = most structurally exhausted).\n\nThe **days-in-coil** counter comes from the persistent state file\n(`state\u002Fcoil_watch.json`), so the scan can say \"IREN — day 6 in the coil.\"\nA name stays in the store until it triggers or exits the coil entirely.\n\n## Per-name display\n\n```\nSYM    fast%R   slow%R   depth    close   day-in-coil   vs SMA200  vs EMA21\nIREN    -92.3    -88.1   -8.1    $7.42   day 3          below SMA200  below EMA21\n```\n\n- **depth**: `min(fast, slow) − (−80)`.  Negative = deeper in the hole.\n- **above\u002Fbelow SMA200 + EMA21**: from live technicals endpoint.\n\n## How to run\n\nFrom the repo root or anywhere under it:\n\n```bash\npython .claude\u002Fskills\u002Fcoil-scan\u002Fscripts\u002Fcoil_scan.py\n```\n\nOptions:\n\n```bash\n# smoke test against a short list\npython coil_scan.py --universe IREN,RGTI,SMCI,SLB,FIG,GLD,ASTS\n\n# limit universe size\npython coil_scan.py --limit 50\n\n# write JSON output\npython coil_scan.py --json \u002Ftmp\u002Fcoil_2026-07-19.json\n\n# custom universe file (one ticker per line, or comma-separated)\npython coil_scan.py --universe \u002Ftmp\u002Fmy_watchlist.txt\n```\n\nUniverse defaults to: all live TDPro screeners + stock-recap persistent watch\nlist (falls back to the most recent `stock-recap\u002Fruns\u002F*\u002Fraw\u002Fscreener_*.json`\nif the live API is unavailable).  Aim: ~150–200 names.\n\n## Persistence\n\n`state\u002Fcoil_watch.json` is keyed by ticker and tracks:\n- `firstSeen` — date first seen in the coil\n- `daysInCoil` — rolling counter updated each run\n- `entryClose` \u002F `lastClose` — price anchors\n- `triggered` \u002F `triggerDate` — when the cross fired\n\nOn each run: newly-coiled names are added, existing names increment their\ncounter, triggered names are flagged, and names that left the coil without\ntriggering are dropped.\n\n## Data sources\n\n- **Bars**: `GET \u002Fapi\u002Fagent\u002Fticker\u002F{SYMBOL}\u002Fchart-data?days=365`\n  (TraderDaddy Pro Railway API; Bearer token from `.env_agent_api`).\n  Needs ≥115 bars for the slow %R(112) leg.\n- **Live technicals**: `GET \u002Fapi\u002Fagent\u002Fticker\u002F{SYMBOL}`\n  (close, ema21, sma200, atr, rsi — used for sanity check + display).\n- **Universe**: `GET \u002Fapi\u002Fscreeners` + `GET \u002Fapi\u002Fscreeners\u002F{id}\u002Frun` × 10.\n\n## Interpreting results for Michael\n\n- **Empty IN THE COIL list**: tape is not oversold broadly — that's fine,\n  nothing to stalk beats a list of knives.\n- **Triggered + already ran**: it moved without you.  Note it for the next\n  pullback but don't chase.\n- **Triggered fresh + below EMA21**: highest-quality entry zone.  Fast is\n  turning, structure is still washed out, price hasn't reclaimed the mean yet.\n- **In coil day 10+**: structural exhaustion is deep.  The longer it coils, the\n  more compressed the spring.  Watch for the fast leg to tick back above −80.\n\nThe scan is a *data layer* — Michael confirms setups on Ghost Flow (the %R\nEXHAUST panel is visible there) before sizing.\n\n## Trigger A\u002FB harness (`coil_ab.py`)\n\nA sibling script runs two trigger rules side by side so we can settle whether\ntightening the trigger helps:\n\n- **CURRENT** (`find_trigger`): both legs were ≤ −80, then fast crosses > −80.\n  Slow is *not* required to still be under −80 at the cross.\n- **STRICT**: fast crosses > −80 *while slow is still ≤ −80* at that same bar\n  (\"fast breaks while slow still under\"). A subset of CURRENT.\n\nA 2026-07-21 backtest found **STRICT is worse** — the crosses it drops (slow\nalready recovered = both legs lifting together = structural confirmation)\noutperformed at every horizon (3\u002F5\u002F10\u002F20d). Fast-leads-while-slow-buried is the\n*earlier but weaker* (knife) signal. So the harness is a live forward test to\nconfirm that before deciding.\n\n```bash\npython coil_ab.py            # log today's fresh triggers under both rules\npython coil_ab.py --report   # re-price the ledger, print STRICT vs CURRENT-ONLY\n```\n\nLedger: `state\u002Fab_ledger.json` (deduped per `symbol|trig_date`). Logs daily via\nweekday 22:00-UTC cron → `state\u002Fab_cron.log`. Core `coil_scan.py` is untouched.\n",{"name":5,"description":7,"trigger_phrases":24},[25,26,27,28,29,30,31,32],"coil scan","bottom of the coil","what's coiled","daily coil","%R exhaustion scan","what's oversold and turning","rte scan","williams %r coil","main","78b6ee6816aca6e5660cc7f0382650e9e7687086","skills\u002Fcoil-scan",6,"https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills","https:\u002F\u002Fgithub.com\u002Fmphinance","https:\u002F\u002Fmphinance.com","2026-11-13 05:04:11",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add mphinance\u002Falpha-skills --skill coil-scan",{"tool":47,"command":48},"bunx","bunx skills add mphinance\u002Falpha-skills --skill coil-scan",{"tool":50,"command":51},"pnpm","pnpm dlx skills add mphinance\u002Falpha-skills --skill coil-scan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcoil-scan\u002FSKILL.md",true,[55,61],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"scripts\u002Fcoil_ab.py","SCRIPT","脚本",6826,"https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcoil-scan\u002Fscripts\u002Fcoil_ab.py",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"scripts\u002Fcoil_scan.py",24018,"https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcoil-scan\u002Fscripts\u002Fcoil_scan.py",[66,74,79,86,93,100],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":73},"01M7BANC8ZXMVWWHSY3E31AAC3","order-lifecycle-safety","Idempotency, reconcile-before-retry, audit-before-forward and environment-proof preflight rules for any code or agent that places broker orders. Use when building or reviewing an order path, handling a timeout or unknown order outcome, adding client_order_id, deciding whether a retry is safe, or confirming paper vs live before sending an order.","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Forder-lifecycle-safety\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":75,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":73},"01M7BAMZ37XP7XM8YDXWWSX0T9","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fquant-skills\u002Fskills\u002Forder-lifecycle-safety\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M74928K9ZC74YQ1GMYB4N2Q0","write-a-skill","Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M749259PAEA22A891D0EJTKK","wireframe-sketch","A hand-drawn wireframe exploration — graph-paper background, marker \u002F\npencil tone, multiple tab labels for variants, sticky-note annotations,\nscribbled chart placeholders, hatched fills. Reads like a designer's\nwhiteboard before any pixels are committed. Use when the brief asks for\n\"wireframe\", \"sketch wireframe\", \"hand-drawn\", \"lo-fi\", \"whiteboard\",\n\"草稿\", or \"手绘原型\".","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwireframe-sketch\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M74920ZWJS5Q1JRVJ8TSTQ5A","weekly-update","Single-file horizontal-swipe slide deck for a weekly team update —\nshipped, in flight, blocked, metrics, asks. 6–8 slides. Use when the\nbrief mentions \"weekly update\", \"team update slides\", \"weekly status\",\n\"周报演示\".","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fweekly-update\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M7491YFRHYFV5QPS0MJ3DSNP","webull-openapi","Trade stocks, options, futures, crypto, and event contracts on Webull. Query real-time and historical market data. Manage accounts and positions. Supports US, HK, JP, SG, TH, MY, UK, MX, BR, EU, ZA, and AU regions with configurable risk controls.","https:\u002F\u002Fgithub.com\u002Fmphinance\u002Falpha-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwebull-openapi\u002FSKILL.md",[],[]]