OPEN-SOURCE SCRIPT

NSE Swing Breadth

112
NSE Swing Breadth – Market Health Dashboard (0–200, % from Neutral)
Overview

NSE Swing Breadth – Market Health Dashboard is a market-wide health and regime indicator designed to track internal strength and participation across Large-, Mid-, and Small-cap indices in the Indian equity market.

Instead of focusing on price alone, this tool measures how strongly each segment is behaving relative to its own swing trend, normalizes those movements, and combines them into a single Market Health score. The result is a clean, objective dashboard that helps traders identify Risk-On, Caution, and Risk-Off regimes.

This indicator is best used for position sizing, exposure control, and timing aggressiveness, rather than individual stock entries.

Data Used

The indicator internally tracks three broad NSE indices:

Large Caps → NIFTY100EQUALWEIGHT

Mid Caps → NIFTYMIDCAP150

Small Caps → NIFTYSMLCAP250

Using equal-weighted and broad indices ensures the signal reflects true market participation, not just index heavyweights.

Core Logic

1. Swing Strength Model

For each index, the script calculates normalized swing strength:

Price is compared to its EMA swing baseline

The deviation from the EMA is normalized using the EMA of absolute deviations

This creates a volatility-adjusted strength value, allowing fair comparison across market regimes


This answers the question:

Is this segment pushing meaningfully above or below its recent trend?


2. Strength Converted to % from Neutral (Baseline = 100)

Each segment’s strength is converted into percentage-style points around a neutral baseline of 100:

100 = Neutral

+15 = +15% strength above neutral

–20 = –20% weakness below neutral

These values are plotted as three smooth lines:

Blue → Large Caps

Orange → Mid Caps

Purple → Small Caps

This makes relative leadership and divergence immediately visible.


3. Market Health Score (0–100)

The indicator combines all three segments into a single Market Health score:

Large Caps → 40% weight

Mid Caps → 35% weight

Small Caps → 25% weight


Extreme values are clamped to avoid distortion, and the final score is normalized to a 0–100 scale:

70–100 → Strong, broad participation

40–69 → Mixed / unstable participation

0–39 → Weak, risk-off conditions


Visual Components


📊 Market Health Histogram

A vertical histogram displays Market Health (0–100) with enhanced visibility:

🟢 Green (≥ 70) → Strong Risk-On regime

🟠 Orange (40–69) → Caution / Transition

🔴 Red (< 40) → Risk-Off regime

The histogram is visually compact and designed to reflect true market health, not exaggerated spikes.


📈 Strength Lines (Baseline = 100)

Three strength lines show % deviation from neutral:

Above 100 → Positive internal strength

Below 100 → Internal weakness

These lines help identify:

Leadership (which segment is driving the market)

Early deterioration (small/mid caps weakening first)

Broad confirmation (all segments rising together)

Dashboard Tables

📌 Market Regime Table (Bottom-Left)

Displays the current market regime:

🟢 RISK ON

🟡 CAUTION

🔴 RISK OFF

Along with the exact Market Health score (0–100).

📌 Strength Table (Top-Right)

Shows Large / Mid / Small cap strength as % from neutral, for example:

+18% → 18% above neutral

–12% → 12% below neutral

This avoids misleading interpretations and keeps values intuitive and actionable.


How to Use This Indicator

Risk-On (Green)
Favor full position sizes, trend-following strategies, and broader participation trades.

Caution (Orange)
Reduce leverage, tighten stops, and be selective. Expect choppiness.

Risk-Off (Red)
Prioritize capital protection, reduce exposure, and avoid aggressive longs.

This indicator is not an entry signal — it is a market environment filter.


⚠️ Important Style Setting (Required)

For correct visualization:

Settings → Style → Uncheck “Labels on price scale”

This prevents the indicator’s internal 0–200 model scale from interfering with the chart’s price scale and keeps the pane clean and readable.


Summary

NSE Swing Breadth – Market Health Dashboard provides a clear, objective view of market internals, helping traders align their risk with the true underlying condition of the market — not just price movement.

It is especially effective for:

Market regime identification

Exposure management

Avoiding false breakouts in weak breadth environments

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.