OPEN-SOURCE SCRIPT

Market State Fear & Greed Bubble Index V1

1 182
Market State Fear & Greed Bubble Index V1
📊 Comprehensive Market Sentiment Analyzer
This advanced indicator measures market psychology through a multi-dimensional scoring system, combining demand/supply pressure, trend momentum, and statistical extremes to identify fear/greed cycles and trading opportunities.

🎯 Core Features
Five-Factor Fear & Greed Score
Weighted sentiment analysis:
Demand/Supply (25%): Real-time buying/selling pressure
RSI (25%): Momentum extremes
KDJ (20%): Overbought/oversold detection
Bollinger Band % (20%): Statistical positioning
ADX Trend (10%): Trend strength confirmation

Multi-Layer Market State Detection
Extreme Fear/Greed: Statistical bubble identification
Trend Bias: Bullish/Bearish/Neutral classification
Confidence Scoring: Setup reliability assessment
Reversal Alerts: Early trend change signals

Visual Dashboard
Top-right information panel displays:
Fear & Greed Score (0-100)
Market State Classification
Trend Bias & Confidence
Signal Quality & Alerts

📈 Key Components
Fear & Greed Gauge
0-30: Extreme Fear (buying opportunities)
30-47: Fear (accumulation zones)
47-70: Neutral (consolidation)
70-90: Greed (caution zones)
90-100: Extreme Greed (selling opportunities)

Deviation Zones
Red Zone (±17.065): Critical reversal areas
Yellow Zone (±34.135): Warning levels
Blue Zone (±47.72): Statistical extremes where reversals are highly likely. These occur when asset prices are in a bubble that's about to pop.

Signal Types
Buy/Sell Labels: Primary entry/exit signals
Scalp Signals: Short-term opportunities
Bottom/Top Detectors: Extreme reversal zones
Whale Indicators: Institutional activity markers

🚀 Trading Applications
Extreme Fear Setups Conditions:
Fear & Greed Score < 34.135
BB% < 0 or < J-inverted line
RSI < 34.135
Confidence score > 68%
Bullish divergence present
Action: Accumulation positions, scaled entries

Extreme Greed Setup Conditions:
Fear & Greed Score > 68.2
BB% > 100 or > 80 with divergence
RSI > 68.2
ADX showing trend exhaustion
Multiple timeframe resistance
Action: Profit-taking, protective stops

Trend Following
Bullish Conditions:
Sentiment score rising from fear zones
DMI+ above DMI- and rising
Confidence > 75%
Volume supporting moves

Bearish Conditions:
Sentiment declining from greed zones
DMI- above DMI+ and rising
Distribution patterns
Multiple resistance failures

⚙️ Customization Options
Adjustable Parameters:
DMI Settings: DI lengths, ADX smoothing
KDJ Periods: Customizable sensitivity
BB% Range: Statistical band adjustments
Smoothing Options: Demand/Supply filtering

Alert Thresholds: Custom signal levels

Visual Customization:
Color schemes for different market states
Line thickness and style preferences
Information panel display options
Alert sound/visual preferences

📊 Signal Interpretation
Primary Signals:
Green 'B': Strong buy opportunity
Red 'S': Strong sell opportunity
White 'Scalp': Short-term trade
Trade Area: Accumulation/distribution zones

Visual Markers:
🔥: Bullish momentum building
🐻: Bear exhaustion building
🐳: Whale/institutional activity

Color-coded fills: Market state visualization

Confidence Levels:
≥80%: High reliability setups
60-79%: Moderate confidence
<60%: Low confidence, avoid or reduce size

⚠️ Risk Management Guidelines
Critical Rules:
Never trade against extreme sentiment (Extreme Fear → buy, Extreme Greed → sell)
Require multiple confirmation signals
Use confidence scores for position sizing

Avoid When:
Conflicting signals between components
Low volume participation
Confidence score < 50%
Major news events pending
Extreme volatility conditions

💡 Advanced Strategies
Sentiment Cycle Trading
Identify sentiment extremes
Wait for confirmation reversals
Enter with trend confirmation
Exit at opposite sentiment extreme
Use confidence scores and fear & greed scores to scale:
Fear & greed scores < 30 = buy area
Fear & greed score > 60 = sell area


Trend Momentum
Exit: At extreme greed with divergence
Enter: At extreme fear with divergence

📊 Market State Classification
Five Primary States:
EXTREME FEAR (BB% <0, RSI <34, Score <34)
FEAR (Score 34-47, bearish momentum)
NEUTRAL (Score 47-70, consolidation)
GREED (Score 70-90, bullish momentum)
EXTREME GREED (Score >90, BB% >100)

State Transitions:
Fear → Neutral: Early accumulation
Neutral → Greed: Trend development
Greed → Extreme Greed: Distribution
Extreme → Reversal: Trend change

🔍 Information Panel Guide
Real-Time Metrics:
FEAR & GREED: Current sentiment score
Market State: Classification and bias
Trend Bias: Bullish/Bearish/Neutral
Confidence: Setup reliability percentage
Momentum: Current directional strength
Volatility: Market condition assessment
Signal Quality: Trade recommendation
Reversal Imminent: Early warning alerts

🌟 Unique Advantages
Psychological Edge:
Quantifies market emotion through multiple indicators
Identifies bubbles before they pop
Provides statistical confidence for each setup
Combines technical extremes with sentiment analysis
Offers clear visual cues for decision making

Professional Features:
Multi-timeframe sentiment analysis
Real-time confidence scoring
Comprehensive alert system
Institutional activity detection
Clear risk/reward visualization

📚 Educational Value
This indicator teaches:
Market psychology cycles
Statistical extreme identification
Multi-indicator confirmation
Risk quantification methods
Professional trade management
Perfect for traders seeking to understand and profit from market sentiment cycles.

Disclaimer: For educational purposes. Trading involves risk. Past performance doesn't guarantee future results.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.