$npx -y skills add ajeeshworkspace/indian-trading-skills --skill india-market-breadthAnalyze Indian market breadth health using advance/decline data, stocks above moving averages, new highs/lows, and sector participation. Use when assessing rally quality, market participation width, or equity exposure levels for NSE/BSE.
| 1 | # India Market Breadth Analyzer |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Market breadth measures how broadly a rally or decline is distributed across the market. A healthy market has broad participation — many stocks and sectors moving in the same direction. A narrow market, where only a few large-cap stocks are driving the index, is fragile and prone to reversal. |
| 6 | |
| 7 | This skill provides a systematic framework to assess NSE/BSE breadth health, score it on a 0-100 composite scale, and translate it into actionable equity exposure recommendations. |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | ## Data Sources |
| 12 | |
| 13 | ### Primary Sources |
| 14 | |
| 15 | | Data Point | Source | Method | |
| 16 | |------------|--------|--------| |
| 17 | | Advance/Decline counts | NSE website / Web search | `WebSearch` for "NSE advance decline data today" | |
| 18 | | Stocks above 200 DMA | Market screeners / Web search | `WebSearch` for "stocks above 200 DMA NSE" | |
| 19 | | Stocks above 50 DMA | Market screeners / Web search | `WebSearch` for "stocks above 50 DMA NSE" | |
| 20 | | New 52-week highs | Groww MCP | `fetch_market_movers_and_trending_stocks_funds` with `YEARLY_HIGH` filter | |
| 21 | | New 52-week lows | Groww MCP | `fetch_market_movers_and_trending_stocks_funds` with `YEARLY_LOW` filter | |
| 22 | | Sector performance | Groww MCP | `get_ltp` for sector indices (Nifty IT, Bank Nifty, Nifty Pharma, etc.) | |
| 23 | | Nifty 50 level | Groww MCP | `get_ltp` for NIFTY | |
| 24 | | Top gainers/losers | Groww MCP | `fetch_market_movers_and_trending_stocks_funds` with `TOP_GAINERS` / `TOP_LOSERS` | |
| 25 | |
| 26 | ### Broker MCP Tools Used |
| 27 | |
| 28 | Use whichever broker MCP is connected (Groww or Zerodha Kite): |
| 29 | |
| 30 | **Groww MCP (if connected):** |
| 31 | 1. **`fetch_market_movers_and_trending_stocks_funds`** — Core tool for yearly highs/lows counts, top gainers/losers, volume data |
| 32 | 2. **`get_ltp`** — Get live prices for Nifty, Bank Nifty, sector indices |
| 33 | 3. **`fetch_historical_candle_data`** — Historical data for trend analysis |
| 34 | 4. **`get_historical_technical_indicators`** — Calculate moving averages for breadth assessment |
| 35 | 5. **`fetch_technical_screener`** — Screen for stocks by technical criteria (RSI, MACD, etc.) |
| 36 | 6. **`fetch_fundamentals_screener`** — Natural language screening for market-cap based analysis |
| 37 | |
| 38 | **Zerodha Kite MCP (if connected):** |
| 39 | 1. **`get_ltp`** — Live prices for Nifty, Bank Nifty, sector indices |
| 40 | 2. **`get_quotes`** — Real-time quotes with market depth |
| 41 | 3. **`get_ohlc`** — OHLC data for indices and stocks |
| 42 | 4. **`get_historical_data`** — Historical candle data for trend analysis |
| 43 | 5. **`search_instruments`** — Search for instruments by name |
| 44 | |
| 45 | --- |
| 46 | |
| 47 | ## Workflow |
| 48 | |
| 49 | ### Step 1: Fetch NSE Advance/Decline Data |
| 50 | |
| 51 | Use web search to get NSE advance/decline data: |
| 52 | ``` |
| 53 | WebSearch: "NSE advance decline ratio today" |
| 54 | WebSearch: "NSE market breadth today advances declines" |
| 55 | ``` |
| 56 | |
| 57 | Key data points needed: |
| 58 | - Number of advances (stocks that closed higher) |
| 59 | - Number of declines (stocks that closed lower) |
| 60 | - Number of unchanged |
| 61 | - Total traded stocks |
| 62 | |
| 63 | ### Step 2: Calculate Breadth Indicators |
| 64 | |
| 65 | #### A/D Ratio |
| 66 | ``` |
| 67 | A/D Ratio = Number of Advances / Number of Declines |
| 68 | |
| 69 | Interpretation: |
| 70 | > 2.0: Strong breadth (broad rally) |
| 71 | 1.5-2.0: Healthy breadth |
| 72 | 1.0-1.5: Neutral |
| 73 | 0.7-1.0: Weak breadth |
| 74 | < 0.7: Very weak (broad selling) |
| 75 | ``` |
| 76 | |
| 77 | #### A/D Line (Cumulative) |
| 78 | ``` |
| 79 | A/D Line = Previous A/D Line + (Advances - Declines) |
| 80 | |
| 81 | Rising A/D Line + Rising Nifty = Confirmed uptrend |
| 82 | Falling A/D Line + Rising Nifty = DIVERGENCE (warning) |
| 83 | Rising A/D Line + Falling Nifty = Accumulation (bullish) |
| 84 | Falling A/D Line + Falling Nifty = Confirmed downtrend |
| 85 | ``` |
| 86 | |
| 87 | #### McClellan Oscillator Concept |
| 88 | ``` |
| 89 | A/D Difference = Advances - Declines |
| 90 | 19-day EMA of A/D Difference (fast) |
| 91 | 39-day EMA of A/D Difference (slow) |
| 92 | McClellan Oscillator = 19-day EMA - 39-day EMA |
| 93 | |
| 94 | > 0: Bullish breadth momentum |
| 95 | < 0: Bearish breadth momentum |
| 96 | > +50: Overbought breadth |
| 97 | < -50: Oversold breadth |
| 98 | ``` |
| 99 | |
| 100 | ### Step 3: Assess % of Stocks Above 200 DMA and 50 DMA |
| 101 | |
| 102 | Use web search or screener tools: |
| 103 | ``` |
| 104 | WebSearch: "percentage of NSE stocks above 200 day moving average" |
| 105 | ``` |
| 106 | |
| 107 | Or use Groww MCP technical screener to estimate: |
| 108 | ``` |
| 109 | fetch_technical_screener with various SMA/EMA filters |
| 110 | ``` |
| 111 | |
| 112 | #### Key Thresholds |
| 113 | |
| 114 | | Metric | Bullish | Neutral | Bearish | |
| 115 | |--------|---------|---------|---------| |
| 116 | | % above 200 DMA | > 60% | 40-60% | < 40% | |
| 117 | | % above 50 DMA | > 55% | 35-55% | < 35% | |
| 118 | | % above 20 DMA | > 50% | 30-50% | < 30% | |
| 119 | |
| 120 | ### Step 4: Count New 52-Week Highs vs Lows (via Groww MCP) |
| 121 | |
| 122 | Use Groww MCP tools: |
| 123 | ```python |
| 124 | # Fetch stocks hitting yearly highs |
| 125 | fetch_market_movers_and_trending_stocks_funds( |
| 126 | discovery_filter_types=["YEARLY_HIGH"], |
| 127 | size=20 |
| 128 | ) |
| 129 | |
| 130 | # Fetch stocks hitting yearly lows |
| 131 | fetch_market_movers_and_trending_stocks_funds( |
| 132 | discovery_filter_types=["YEARLY_LOW"], |
| 133 | size=20 |
| 134 | ) |
| 135 | ``` |
| 136 | |
| 137 | #### Interpretation |
| 138 | |
| 139 | | Highs:Lows Ratio | Signal | |
| 140 | | |