OPEN-SOURCE SCRIPT

Momentum Color Classification System

116
### 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.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.