detect-atr-squeeze-regime

detect-atr-squeeze-regime is a skill for Claude Code, Codex from fatfingererr/macro-skills. It costs 70 tokens per session (3,116 once invoked), scanned A, original, MIT.

A market-volatility analysis based on ATR, a measure of how much an asset’s price typically moves. It converts ATR into a percentage and compares today’s volatility with its three-year average to detect unusually turbulent periods.

In plain words
What is it for?
Use it to classify markets as orderly, unusually volatile but directional, or dominated by a volatility squeeze, then assess stop-loss distances, position sizing, time frames, and trading structures.
Why use it?
It helps show when technical price levels and tight stop-loss orders may become unreliable because forced buying and selling creates large swings. This supports decisions about position size, trade duration, and risk limits.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to classify markets as orderly, unusually volatile but directional, or dominated by a volatility squeeze, then assess stop-loss distances, position sizing, time frames, and trading structures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fatfingererr/macro-skills/detect-atr-squeeze-regime
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fatfingererr/macro-skills --skill detect-atr-squeeze-regime
Clone the repo
git clone --depth 1 https://github.com/fatfingererr/macro-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin detect-atr-squeeze-regime/plugin install detect-atr-squeeze-regime after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for detect-atr-squeeze-regime

README.md
[![agentmods](https://agentmods.dev/badge/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime/github.svg)](https://agentmods.dev/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime)
Your own site
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for detect-atr-squeeze-regime

Your own site · 80×15
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/detect-atr-squeeze-regime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,116 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.03116
Opus 5 $0.00035 $0.01558
Sonnet 5 $0.00014 $0.00623
Haiku 4.5 $0.00007 $0.00312

Measured 11d ago against content hash cdb2be8ae90d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

detect-atr-squeeze-regime scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/atr_squeeze.py, scripts/plot_atr_squeeze.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/detect-atr-squeeze-regime/SKILL.md · 293 lines

How it starts

The opening of the file, as written. The whole thing — 293 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<essential_principles>

傳統 ATR 是絕對值(價格單位),不同價位資產無法比較。 將 ATR 轉換為百分比(ATR / Close * 100)後:

  • 可跨資產比較波動強度
  • 能建立「常態基準」(3 年移動均值)
  • 用「倍率」判定是否進入異常波動區
ATR% = (14-day EMA of True Range) / Close * 100
Ratio = Current ATR% / 3-year Rolling Mean ATR%
行情 ATR% 條件 Ratio 條件 市場特徵
orderly_market 常態區間 < 1.2 技術位有效、停損精準、趨勢追蹤可靠
elevated_volatility_trend 偏高 1.2 - 2.0 技術位減效、需放寬停損、仍有方向性
volatility_dominated_squeeze >= 高波門檻 >= 2.0 技術位失靈、停損頻被掃、反身性主導

擠壓行情的判定需要同時滿足:

  1. ATR% >= high_vol_threshold_pct(預設 6%)
  2. Ratio >= spike_threshold_x(預設 2.0)

當進入 volatility_dominated_squeeze 行情:

價格運動被「被迫流」主導

  • 保證金調整 / 槓桿去化
  • 期權 Delta/Gamma 避險
  • 空頭回補
  • 被動風險平價再平衡

技術位可靠度下降

  • 突破/跌破更常是流動性與風控觸發的結果
  • 不代表基本面改變或趨勢確認

停損脆弱性

  • 同一口波動可掃過多層 stops
  • 低時間尺度的 conviction trading「結構性受損」
  • 宏觀看對也難撐:短期雜訊大到足以讓方向正確的部位先被洗掉

當偵測到擠壓行情時:

調整項目 秩序市場 擠壓行情
停損倍數 1.0-1.5 ATR 2.0-3.0 ATR
倉位縮放 正常 降至 1/ATR%
時間框架 日內/短線 切換到較長週期
工具選擇 裸倉位 期權/價差結構
技術位信任 低(視為雜訊)

</essential_principles>

  1. 計算 ATR%:14 日 EMA 平滑的真實波幅百分比
  2. 建立基準:3 年滾動均值作為「常態」參照
  3. 判定行情:比較當前值與基準的倍率
  4. 輸出建議:停損調整、倉位縮放、技術位信任度

輸出:行情判定、ATR% 數值、倍率、可操作的風控建議。

<quick_start>

最快的方式:偵測白銀(SI=F)

cd skills/detect-atr-squeeze-regime
pip install pandas numpy yfinance pandas_ta  # 首次使用
python scripts/atr_squeeze.py --symbol SI=F --quick

輸出範例:

{
  "symbol": "SI=F",
  "as_of": "2026-01-14",
  "regime": "volatility_dominated_squeeze",
  "atr_pct": 7.23,
  "atr_ratio_to_baseline": 2.41,
  "tech_level_reliability": "low",
  "tech_level_reliability_score": 28,
  "suggested_stop_atr_mult": 2.5,
  "position_scale": 0.41
}

完整分析

python scripts/atr_squeeze.py --symbol XAGUSD --start 2020-01-01 --end 2026-01-01 --output result.json

生成視覺化儀表盤

pip install matplotlib  # 首次使用
python scripts/plot_atr_squeeze.py --symbol SI=F --output output/

儀表盤包含:

  • 價格走勢圖
  • ATR% 波動率時間序列
  • ATR 倍率儀表盤
  • 當前狀態與風控建議面板

</quick_start>

  1. 快速偵測 - 檢查單一資產的當前行情狀態
  2. 多資產掃描 - 掃描多個資產尋找擠壓行情
  3. 歷史回測 - 回溯識別過去的擠壓期間
  4. 持續監控 - 設定警報當行情切換時通知
  5. 方法論學習 - 了解 ATR 擠壓行情的理論基礎

請選擇或直接提供資產代碼開始分析。

路由後,閱讀對應文件並執行。

<directory_structure>

detect-atr-squeeze-regime/
├── SKILL.md                           # 本文件(路由器)
├── skill.yaml                         # 前端展示元數據
├── manifest.json                      # 技能元數據
├── workflows/
│   ├── detect.md                      # 單資產偵測工作流
│   ├── monitor.md                     # 多資產監控工作流
│   └── backtest.md                    # 歷史回測工作流
├── references/
│   ├── methodology.md                 # ATR 擠壓行情方法論
│   ├── input-schema.md                # 完整輸入參數定義
│   └── data-sources.md                # 資料來源說明
├── templates/
│   ├── output-json.md                 # JSON 輸出模板
│   └── output-markdown.md             # Markdown 報告模板
├── scripts/
│   ├── atr_squeeze.py                 # 主偵測腳本
│   └── plot_atr_squeeze.py            # 視覺化儀表盤腳本
└── examples/
    └── xagusd-squeeze-2024.json       # 範例輸出

</directory_structure>

Read the full file on GitHub · 293 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 293 lines · 70 tokens per session scan A cdb2be8ae90d

Subscribe to this mod's changes

detect-atr-squeeze-regime is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 70 tokens to every session and 3,116 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

trading-risk-gate

Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

winstonkoh87/Athena-Public · 53 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens