PROTECTED SOURCE SCRIPT
Market Emotion Cycle Detector

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
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
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.