OPEN-SOURCE SCRIPT
Shock Wave: EMA9 Slope / ATR (Normalized) for SPY

Shock Wave – EMA9 Slope Normalized by ATR (Fragility Gauge)
This indicator measures trend fragility, not direction.
Instead of relying on visual trendline angles (which change with zoom and chart scaling), this tool normalizes the slope of the 9-EMA by ATR, producing a scale-independent steepness metric that remains consistent across timeframes and zoom levels.
The goal is to identify late-stage acceleration and liquidity vulnerability — conditions where price is advancing faster than inventory can rebalance and the market becomes sensitive to forced liquidation.
What this indicator shows
Normalized EMA9 slope (ATR per bar)
An angle-like degree value derived from the normalized slope (for intuition only)
Background shading to highlight trend maturity / fragility
A compact table showing live readings on the chart
How to interpret
Green / low values (< ~0.30 ATR/bar): Healthy, sustainable trend
Orange / mid values (~0.30–0.40 ATR/bar): Late-stage acceleration
Red / high values (≥ ~0.45 ATR/bar): Fragile / liquidation-prone conditions
These thresholds are empirically derived from historical index behavior (e.g., SPY prior to 2018, 2020, 2022 volatility events).
Important notes
This is not a buy or sell signal
Red does not mean “short”
The indicator highlights risk asymmetry, not timing
Best used on higher timeframes (weekly) in conjunction with liquidity, inducement, and higher-timeframe structure analysis
Why use this
Markets often fail after strong trends, not because they are weak, but because they are crowded. This tool helps quantify when a trend has become structurally vulnerable, providing context for liquidity-based frameworks and macro risk management.
This indicator measures trend fragility, not direction.
Instead of relying on visual trendline angles (which change with zoom and chart scaling), this tool normalizes the slope of the 9-EMA by ATR, producing a scale-independent steepness metric that remains consistent across timeframes and zoom levels.
The goal is to identify late-stage acceleration and liquidity vulnerability — conditions where price is advancing faster than inventory can rebalance and the market becomes sensitive to forced liquidation.
What this indicator shows
Normalized EMA9 slope (ATR per bar)
An angle-like degree value derived from the normalized slope (for intuition only)
Background shading to highlight trend maturity / fragility
A compact table showing live readings on the chart
How to interpret
Green / low values (< ~0.30 ATR/bar): Healthy, sustainable trend
Orange / mid values (~0.30–0.40 ATR/bar): Late-stage acceleration
Red / high values (≥ ~0.45 ATR/bar): Fragile / liquidation-prone conditions
These thresholds are empirically derived from historical index behavior (e.g., SPY prior to 2018, 2020, 2022 volatility events).
Important notes
This is not a buy or sell signal
Red does not mean “short”
The indicator highlights risk asymmetry, not timing
Best used on higher timeframes (weekly) in conjunction with liquidity, inducement, and higher-timeframe structure analysis
Why use this
Markets often fail after strong trends, not because they are weak, but because they are crowded. This tool helps quantify when a trend has become structurally vulnerable, providing context for liquidity-based frameworks and macro risk management.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.