OPEN-SOURCE SCRIPT

AetherEdge - Sentiment-Proxy Correlation Mapper

1 799
🖊️ Overview

A psychology-focused engine that infers crowd emotion without any social or news feed — purely from price action. It builds sentiment proxies — volume anomaly (panic/euphoria), volatility (fear), price velocity (momentum drive), wick asymmetry (greed vs. fear at extremes), and run-length (FOMO / capitulation) — then uses a NeuraLib correlation map to learn how these proxies move together and weighs them into a single Fear ⇄ Greed sentiment score. A self-adapting mapping continuously re-correlates the proxies against realized outcomes, and the engine flags sentiment turning points — the moments crowd emotion flips. Visualization: a chart-background gradient shading the tape from Fear (red) to Greed (green), plus emphasis dots only at the reversals.

🔶 Key Features

Sentiment proxies — five emotion proxies built from price action alone (no external data)
NeuraLib correlation mapping — learns the proxies' joint behavior and fuses them into a Fear⇄Greed score
Self-adapting correlation — continuously re-correlates proxies against realized outcomes (learns which matter)
Turning-point detection — flags fear⇄greed reversals on a zero-line cross with sufficient swing
Sentiment background gradient — shades the chart from fear (red) through neutral to greed (green), intensity by magnitude
Turning-point dots — only the reversal moments are emphasized with dots and labels (noise excluded)
Emotional extreme markers — faint diamonds when sentiment enters a greed/fear extreme zone
Intelligence panel — Fear⇄Greed gauge, each proxy's value and learned correlation strength, and the latest turn

🧠 Technical Architecture

The engine builds five sentiment proxies from price: (1) volume anomaly (volume z-score × candle direction = euphoric buying / panic selling), (2) volatility (ATR ratio = higher is fear/stress), (3) price velocity (ATR-normalized speed of change = momentum), (4) wick asymmetry (lower − upper wick = which side defended the extreme), and (5) run-length (consecutive up/down within the window = FOMO / capitulation).
These feed the NeuraLib correlation map: proxies(5) → hidden(tanh) → sentiment(1, tanh-bounded [-1,1]), trained by supervision so sentiment correlates with realized forward direction — greed (positive) preceding up-moves, fear (negative) preceding down-moves. After each step, each proxy's contribution to the hidden layer (mean absolute weight) is recomputed as its correlation strength, shown in the panel so you can see which proxy currently dominates emotion.
Sentiment is smoothed into a [-1,1] Fear⇄Greed score. Turning-point detection flags a fear→greed (or reverse) reversal when a zero-line cross's magnitude clears the Turn Sensitivity. The background is colored continuously by color.from_gradient, with intensity proportional to emotional magnitude.

⚙️ Recommended Settings & Tuning Guide

BTC (1H–4H): Volume 20, Volatility 14, Velocity 10, Smoothing 4, Turn Sensitivity 0.20. Standard settings fit well
ETH (1H–4H): As BTC, with Outcome Lookahead 5–8
SOL (15m–1H): High volatility favors Smoothing 5–6 to smooth sentiment, Turn Sensitivity 0.25 to suppress false turns
XRP (1H–4H): Spike-prone; Volume window 15 for sensitive anomaly detection, Extreme Threshold 0.5 for early extremes
Turn Sensitivity: higher makes turns selective (only large emotional reversals); lower detects more frequently
Extreme Threshold: beyond ±this is "extreme greed/fear" — a contrarian guide at 0.5–0.6
Sentiment Smoothing: higher smooths the background and score; lower is more reactive
Background Intensity: lower makes the background more vivid — adjust to taste

💡 How to Use in Practice

Reading the gradient: deep green = greed dominates (possible overheating); deep red = fear dominates (possible capitulation); neutral = balanced — saturation is emotional strength
Using turning-point dots: a "FEAR→GREED" dot marks a flip from fear to greed (possible bottom); "GREED→FEAR" a possible top — a basis for contrarian/trend entries
Contrarian at extremes: at extreme greed (green diamond) beware a pullback from overheating; at extreme fear (red diamond) watch for an oversold bounce — quantifying "be fearful when others are greedy"
Watching proxy correlations: the panel's per-proxy value and correlation strength reveal what drives emotion now (e.g. high volume-anomaly correlation = volume-led sentiment)
Background vs. price divergence: price rising while the background reads fear (bearish sentiment) is an early reversal warning
Multi-timeframe usage: read the big-picture emotional regime on the higher timeframe (4H), then time entries on turning points on the lower one (15m–1H)

⚠️ Important Notes

Nature of proxies: this is not real social/news sentiment but an estimated proxy inferred from price action — an approximation of crowd psychology that differs from external sentiment data
Initial learning period: right after launch the map's buffer is nearly empty and emotion estimates are unstable; treat as low-confidence until it fills (100+ bars)
Learning resets: changing parameters, switching symbol/timeframe, or recompiling reinitializes the map weights and buffer, restarting learning from zero
Danger of contrarianism: extreme emotion can persist (greed runs long in strong trends) — an extreme is not an instant reversal; pair with risk management
On look-ahead: the map's target uses closed-bar realized direction (a standard training construct); current-bar emotion is on confirmed values, but as with any adaptive system, historical and live behavior can differ — always forward-test
Constraints: this is a lightweight implementation operating within Pine's compute budget

🚨 Disclaimer

This indicator is an analytical and educational visualization tool. The sentiment proxies, correlation mapping, Fear⇄Greed score, turning-point detection, and sentiment background are quantitative heuristics computed on-chart from price data — they are not financial advice, buy/sell signals, or any guarantee of future performance. Estimates of crowd psychology can be wrong. Always combine any tool with your own analysis and disciplined risk management.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.