PROTECTED SOURCE SCRIPT
Mis à jour

Market Emotion Cycle Detector

100
This indicator estimates emotional phases in price behavior by measuring how far price deviates from its dynamic mean.
It uses an adaptive Z-Score normalization with volatility-aware scaling and optional higher-timeframe blending.

Each candle is color-coded according to its deviation level, creating a clear visual map of market sentiment, from extreme panic (MAX FEAR) to euphoric exhaustion (MAX EUPHORIA).
The tool helps identify accumulation and distribution phases inside cyclical or mean-reverting markets.

🧩 Core Logic

Z-Score of EMA-smoothed price: measures standardized distance from the mean.

ATR regime scaling: adjusts sensitivity across volatility environments.

Optional higher-TF fusion: smooths sentiment transitions without lookahead.

Phase classification: seven discrete emotion zones (MAX FEAR → MAX EUPHORIA).

Non-repainting signals: phase changes confirmed on bar close only.

⚙️ Setup Instructions

To allow full color rendering by the Emotion Candles:

Open Chart Settings → Symbol → Candles
 • Uncheck “Color bars based on previous close”
 • Clear all Body, Wick, and Border colors

On the chart, right-click any overlay element (coin label, MTX, indicator tag …)
 • Choose Hide from the ⋮ menu to keep the view clean

Ensure background contrast makes emotion colors visible.

🎯 Usage Notes

Designed for contextual sentiment analysis, not automated entries.

Works best when combined with independent trend or structure confirmation.

Webhook-ready alerts are available for LONG / SHORT / FLAT transitions.

Default parameters are calibrated for daily and 4-hour charts; shorter TFs may require reduced lookback.

📘 Classification Reference

MAX FEAR:
Capitulation & panic; potential deep-value accumulation zones

FEAR:
Negative bias but stabilizing volatility

CONCERN:
Early recovery interest; risk-reward starts improving

NEUTRAL:
Balanced sentiment, transition zone

MILD GREED:
Optimism emerges, trend continuation possible

GREED:
Late-stage rally; profit-taking often begins

MAX EUPHORIA:
Emotional climax, exhaustion and distribution signals

This publication is an original implementation of an adaptive sentiment model - not a mash-up or derivative of existing indicators.

Created by geokat
Notes de version
This update is a complete visual and structural overhaul and bug fixes:

1. Full Emotion Color System
Each emotion phase now has its own:
• Candle color toggle
• Background color toggle
• Custom color selector
You can show or hide either layer independently.

2. Clean, Minimal Candle Styling
Emotion-colored candles can be enabled or disabled globally.
If disabled, the chart remains clean and untouched.

3. Transparent Background Mapping
Optional background shading for each phase with adjustable transparency.
Non-intrusive, designed to support high-contrast charts.

4. Compact Live Legend (Top-Right)
A redesigned legend panel:
• Smaller footprint
• No blocky backgrounds
• The active emotion highlights automatically
• Color swatches are pure solid colors, easy to read and interpret

5. Enhanced Phase Detection
Improved regime scaling using ATR normalization ensures consistent behavior across different markets and volatility states.

6. Cleaner Signals & Alerts
• “Concern” = Long bias
• “Greed” = Short bias
• “Neutral” = Flatten
Notes de version
Minor fix
Notes de version
Minor fix
Notes de version
Bug fix
Notes de version
Bug fix

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.