
Market Top Detector
Apply William O’Neil-style distribution and stalling day rules to judge when a major index uptrend is under institutional selling pressure.
Overview
market-top-detector is an agent skill for the Idea phase (research) that teaches distribution-day and stalling-day rules to assess NASDAQ/S&P 500 uptrend health.
Install
npx skills add https://github.com/tradermonty/claude-trading-skills --skill market-top-detectorWhat is this skill?
- Defines distribution days: index down ≥0.2% on higher volume than the prior session
- Defines stalling days (higher volume, gain <0.1%) counted as 0.5 distribution days
- 25-trading-day expiration window for distribution signals
- Explicit exclusions: lower-volume declines and weak participation do not count
- Interpretation table tying effective distribution count to recommended action
- Distribution day threshold: price decline ≥0.2% with volume above prior day
- Stalling days weighted at 0.5 in the effective distribution count
- Distribution signals expire after 25 trading days
Adoption & trust: 536 installs on skills.sh; 1.8k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You watch index pullbacks but cannot consistently tell institutional distribution from low-volume profit-taking.
Who is it for?
Swing or position traders and builders coding scanners who follow CAN SLIM / O’Neil-style market timing checks.
Skip if: Long-only buy-and-hold investors with no index timing process, or crypto-only strategies where these index rules do not apply.
When should I use this skill?
User asks about distribution days, market tops, institutional selling on indexes, or O’Neil-style market timing.
What do I get? / Deliverables
You count qualifying distribution and stalling days inside a 25-day window and map the effective total to a documented risk posture.
- Rule-consistent distribution and stalling day tally with effective count
- Action interpretation aligned to the skill’s count table
Recommended Skills
Journey fit
Market-top detection is research and signal interpretation before trade or strategy commits—not shipping product code. Research fits systematic reading of index price/volume behavior and rolling 25-day distribution counts.
How it compares
Skill-backed rule reference for index distribution—not a live data MCP or broker execution integration.
Common Questions / FAQ
Who is market-top-detector for?
Independent traders and developers who want agent-guided, rule-based distribution day counting on major US indexes.
When should I use market-top-detector?
During Idea-phase market research when evaluating whether to reduce exposure, tighten stops, or pause new buys after several valid distribution days.
Is market-top-detector safe to install?
It is educational trading methodology only; review the Security Audits panel on this Prism page—never treat any skill as financial advice or substitute for your risk policy.
SKILL.md
READMESKILL.md - Market Top Detector
# Distribution Day Guide ## What is a Distribution Day? A Distribution Day occurs when a major stock index (S&P 500 or NASDAQ Composite) declines by 0.2% or more on volume that is higher than the previous trading day. This pattern indicates institutional investors are selling stocks in volume - "distributing" their holdings. William O'Neil introduced this concept in "How to Make Money in Stocks" as one of the most reliable signals that a market uptrend is under pressure. ## Precise Rules ### Distribution Day Criteria (BOTH must be met): 1. **Price decline >= 0.2%** from previous session's close 2. **Volume > previous day's volume** (even slightly higher counts) ### Stalling Day Criteria (BOTH must be met): 1. **Volume > previous day's volume** (institutional activity present) 2. **Price gain < 0.1%** (price fails to advance meaningfully despite volume) 3. Stalling days count as **0.5 distribution days** in the effective count ### 25-Day Expiration Rule: - A distribution day automatically expires after **25 trading days** (approximately 5 weeks) - Only the rolling 25-day window matters - This prevents old distribution from affecting current assessment ### What Does NOT Count as Distribution: - Index declines on lower volume (normal profit-taking) - Large gap-up open followed by slight closing decline (still net positive day) - Volume below average (lack of institutional participation) ## Counting and Interpretation | Effective Count | Interpretation | Action | |----------------|----------------|--------| | 0-1 | Healthy market | Normal operations | | 2-3 | Some selling but normal | Monitor closely | | 4 | O'Neil's initial warning | Tighten stops | | 5 | Significant distribution | Reduce exposure | | 6+ | Heavy distribution | Protect capital aggressively | **Effective Count Formula:** ``` Effective Count = Distribution Days + (0.5 × Stalling Days) ``` ## Dual-Index Approach This tool monitors both the S&P 500 and NASDAQ (via QQQ). The higher effective count between the two indices is used for scoring, because: 1. Distribution can concentrate in one index before the other 2. NASDAQ often leads due to higher growth stock concentration 3. The worst signal from either index is the most conservative approach ## Common Patterns at Market Tops ### Classic Distribution Sequence (2022 Example): 1. Week 1: One distribution day (seems harmless) 2. Week 2: Two more distribution days 3. Week 3: One stalling day (selling into rallies) 4. Week 4: Two more distribution days (total: 5-6 effective) 5. Market breaks down shortly after ### False Alarm Pattern: 1. Two distribution days in quick succession 2. Market rallies strongly, erasing concerns 3. Distribution days expire without reaching critical mass 4. Uptrend continues ### Key Distinction: The **clustering** of distribution days matters. Three distribution days in one week is more alarming than three spread over five weeks. ## Follow-Through Day (FTD) The FTD is the counterpart to distribution days - it signals a potential new uptrend after a correction. ### FTD Rules: 1. **Rally Attempt:** Market makes its low and begins to rally (first up day) 2. **Counting:** Start counting from day 1 of the rally attempt 3. **FTD Occurs on Day 4-7:** A significant price gain (>1.5%) with volume higher than the previous day 4. **Confirmation:** The FTD should be on day 4 at the earliest (premature rallies on days 1-3 are unreliable) ### FTD Reliability: - Not all FTDs lead to sustained uptrends (~25% fail) - Multiple FTDs within a short period increase confidence - FTDs work best when combined with improving breadth - O'Neil: "I never try to buy at the bottom. I wait for the Follow-Through Day." ## Practical Tips ### When Monitoring Distribution: 1. Check distribution count DAILY during uncertain markets 2. Pay special attention when count reaches 3 (pre-warning) 3. At 4+, begin defensive actions regardless of other signals 4. Don't wait for 6+ to act - by then, significant damage