OPEN-SOURCE SCRIPT
Momentum Color Classification System

### Code Analysis: Momentum Color Classification System (Pine Script v5)
#### Core Function
This is a **non-overlay TradingView Pine Script v5 indicator** designed to quantify and categorize price momentum dynamics with extreme precision. It calculates core momentum from price Rate of Change (ROC) and second-derivative momentum change, then classifies market momentum into 9 distinct states (bullish variations, bearish variations, and neutral oscillation). The indicator visualizes momentum via color-coded histogram bars, and provides real-time status labels, a detailed info dashboard, and actionable trading suggestions — all to help traders accurately identify momentum strength, acceleration/deceleration trends, and guide long/short trading decisions.
#### Key Features (Concise & Clear)
1. **9-tier Precise Momentum Classification**
Divides momentum into **4 bullish states** (accelerating/decelerating/steady/weak up), **4 bearish states** (accelerating/decelerating/steady/weak down) and 1 neutral oscillation state, fully covering all momentum trend phases in the market.
2. **2-dimensional Momentum Calculation**
Combines **1st-order momentum** (price ROC-based core momentum) and **2nd-order momentum change** (momentum acceleration/deceleration), plus absolute momentum strength, to comprehensively judge momentum direction, speed and intensity.
3. **Color-Coded Visualization with Hierarchy**
Uses a gradient color system (vibrant-to-pale green for bullish, vivid-to-light red for bearish, gray for neutral) with transparency differentiation to reflect momentum strength; histogram style ensures intuitive observation, paired with a dotted zero reference line for clear bias judgment.
4. **Practical Trading Auxiliary Tools**
Supports toggleable status labels for extreme momentum (accelerating up/down); embeds a top-right dashboard displaying real-time momentum values, change rate, state, strength level and direct trading suggestions, enabling one-glance market judgment.
5. **High Customizability**
Allows adjustment of core parameters (momentum calculation period, smoothing factor) and toggling of label display, with reasonable parameter ranges to adapt to different trading assets and timeframes.
6. **Trade-Oriented Decision Guidance**
Maps each momentum state to corresponding strength levels and actionable operation advice (long/add position, short/add position, hold, reduce position, wait), directly linking technical analysis to actual trading behavior.
#### Core Function
This is a **non-overlay TradingView Pine Script v5 indicator** designed to quantify and categorize price momentum dynamics with extreme precision. It calculates core momentum from price Rate of Change (ROC) and second-derivative momentum change, then classifies market momentum into 9 distinct states (bullish variations, bearish variations, and neutral oscillation). The indicator visualizes momentum via color-coded histogram bars, and provides real-time status labels, a detailed info dashboard, and actionable trading suggestions — all to help traders accurately identify momentum strength, acceleration/deceleration trends, and guide long/short trading decisions.
#### Key Features (Concise & Clear)
1. **9-tier Precise Momentum Classification**
Divides momentum into **4 bullish states** (accelerating/decelerating/steady/weak up), **4 bearish states** (accelerating/decelerating/steady/weak down) and 1 neutral oscillation state, fully covering all momentum trend phases in the market.
2. **2-dimensional Momentum Calculation**
Combines **1st-order momentum** (price ROC-based core momentum) and **2nd-order momentum change** (momentum acceleration/deceleration), plus absolute momentum strength, to comprehensively judge momentum direction, speed and intensity.
3. **Color-Coded Visualization with Hierarchy**
Uses a gradient color system (vibrant-to-pale green for bullish, vivid-to-light red for bearish, gray for neutral) with transparency differentiation to reflect momentum strength; histogram style ensures intuitive observation, paired with a dotted zero reference line for clear bias judgment.
4. **Practical Trading Auxiliary Tools**
Supports toggleable status labels for extreme momentum (accelerating up/down); embeds a top-right dashboard displaying real-time momentum values, change rate, state, strength level and direct trading suggestions, enabling one-glance market judgment.
5. **High Customizability**
Allows adjustment of core parameters (momentum calculation period, smoothing factor) and toggling of label display, with reasonable parameter ranges to adapt to different trading assets and timeframes.
6. **Trade-Oriented Decision Guidance**
Maps each momentum state to corresponding strength levels and actionable operation advice (long/add position, short/add position, hold, reduce position, wait), directly linking technical analysis to actual trading behavior.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。