Logo de Coil Scan

Coil Scan

Comunidade
mphinance
coil-scan

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.

Visão geral

Publicado pormphinance
Repositórioalpha-skills
Nome da habilidadecoil-scan
Estrelas
32
Forks
6
Arquivos incluídos
2
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 2

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por mphinance no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Coil Scan no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/mphinance/alpha-skills/tree/main/plugins/quant-skills/skills/coil-scan
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mphinance/alpha-skills.git /tmp/alpha-skills
mkdir -p .claude/skills
cp -r /tmp/alpha-skills/plugins/quant-skills/skills/coil-scan .claude/skills/coil-scan
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Coil Scan em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Coil Scan automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Coil Scan não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Coil Scan — dual-timeframe %R Trend Exhaustion

Mirrors the "%R Trend Exhaustion [upslidedown]" TradingView indicator (dual timeframe 21 + 112). Finds stocks that are both deeply oversold AND just starting to reverse.

The indicator math

  • %R(n) = Williams %R = 100 * (close - highestHigh_n) / (highestHigh_n - lowestLow_n), range −100…0.
  • Fast leg = EMA(7) of %R(21).
  • Slow leg = EMA(3) of %R(112).
  • Threshold (TH) = −80.
  • In the coil: both fast AND slow ≤ −80. The short-term AND the structural picture are both deeply oversold. This is the stalk zone — a name can sit here for days/weeks before the trigger fires.
  • Triggered out: fast crossed back above −80 while it was recently (within ~20 bars) coiled on both legs. The slow leg still lagging confirms the structural exhaustion hasn't reset — this is the bullish reversal signal.

Two output buckets

⚡ TRIGGERED OUT (≤3 days ago)

Fast just crossed back above −80. These are actionable reversal candidates.

A sanity check filters false-positives:

  • If the close is already >5% above the price on the trigger date → tagged "already ran — not fresh" and downranked.
  • If the close is now above EMA21 → same tag.

The canonical false-positive this catches: SLB crossed up but had already run +4% to just under its 21EMA by the time the scan ran — that's a chase, not an entry. It lands in the sanity-filtered section, not the fresh list.

🟢 IN THE COIL (stalk candidates)

Both legs ≤ −80, no trigger yet. Sorted deepest-first (most negative slow leg = most structurally exhausted).

The days-in-coil counter comes from the persistent state file (state/coil_watch.json), so the scan can say "IREN — day 6 in the coil." A name stays in the store until it triggers or exits the coil entirely.

Per-name display

SYM    fast%R   slow%R   depth    close   day-in-coil   vs SMA200  vs EMA21
IREN    -92.3    -88.1   -8.1    $7.42   day 3          below SMA200  below EMA21
  • depth: min(fast, slow) − (−80). Negative = deeper in the hole.
  • above/below SMA200 + EMA21: from live technicals endpoint.

How to run

From the repo root or anywhere under it:

bash
python .claude/skills/coil-scan/scripts/coil_scan.py

Options:

bash
# smoke test against a short list
python coil_scan.py --universe IREN,RGTI,SMCI,SLB,FIG,GLD,ASTS

# limit universe size
python coil_scan.py --limit 50

# write JSON output
python coil_scan.py --json /tmp/coil_2026-07-19.json

# custom universe file (one ticker per line, or comma-separated)
python coil_scan.py --universe /tmp/my_watchlist.txt

Universe defaults to: all live TDPro screeners + stock-recap persistent watch list (falls back to the most recent stock-recap/runs/*/raw/screener_*.json if the live API is unavailable). Aim: ~150–200 names.

Persistence

state/coil_watch.json is keyed by ticker and tracks:

  • firstSeen — date first seen in the coil
  • daysInCoil — rolling counter updated each run
  • entryClose / lastClose — price anchors
  • triggered / triggerDate — when the cross fired

On each run: newly-coiled names are added, existing names increment their counter, triggered names are flagged, and names that left the coil without triggering are dropped.

Data sources

  • Bars: GET /api/agent/ticker/{SYMBOL}/chart-data?days=365 (TraderDaddy Pro Railway API; Bearer token from .env_agent_api). Needs ≥115 bars for the slow %R(112) leg.
  • Live technicals: GET /api/agent/ticker/{SYMBOL} (close, ema21, sma200, atr, rsi — used for sanity check + display).
  • Universe: GET /api/screeners + GET /api/screeners/{id}/run × 10.

Interpreting results for Michael

  • Empty IN THE COIL list: tape is not oversold broadly — that's fine, nothing to stalk beats a list of knives.
  • Triggered + already ran: it moved without you. Note it for the next pullback but don't chase.
  • Triggered fresh + below EMA21: highest-quality entry zone. Fast is turning, structure is still washed out, price hasn't reclaimed the mean yet.
  • In coil day 10+: structural exhaustion is deep. The longer it coils, the more compressed the spring. Watch for the fast leg to tick back above −80.

The scan is a data layer — Michael confirms setups on Ghost Flow (the %R EXHAUST panel is visible there) before sizing.

Trigger A/B harness (coil_ab.py)

A sibling script runs two trigger rules side by side so we can settle whether tightening the trigger helps:

  • CURRENT (find_trigger): both legs were ≤ −80, then fast crosses > −80. Slow is not required to still be under −80 at the cross.
  • STRICT: fast crosses > −80 while slow is still ≤ −80 at that same bar ("fast breaks while slow still under"). A subset of CURRENT.

A 2026-07-21 backtest found STRICT is worse — the crosses it drops (slow already recovered = both legs lifting together = structural confirmation) outperformed at every horizon (3/5/10/20d). Fast-leads-while-slow-buried is the earlier but weaker (knife) signal. So the harness is a live forward test to confirm that before deciding.

bash
python coil_ab.py            # log today's fresh triggers under both rules
python coil_ab.py --report   # re-price the ledger, print STRICT vs CURRENT-ONLY

Ledger: state/ab_ledger.json (deduped per symbol|trig_date). Logs daily via weekday 22:00-UTC cron → state/ab_cron.log. Core coil_scan.py is untouched.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Coil Scan faz?

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.

Por que usar Coil Scan no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Coil Scan é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Coil Scan no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/mphinance/alpha-skills/tree/main/plugins/quant-skills/skills/coil-scan. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Coil Scan?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Coil Scan?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Coil Scan com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Coil Scan é gratuita?

Sim. A habilidade é publicada no GitHub por mphinance sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇