OPEN-SOURCE SCRIPT

BTC - Sentiment (Posts weighted) LSMA

44
BTC - Sentiment (Posts Weighted) LSMA | RM

Concept
In the current 2026 market regime, Bitcoin has transitioned into a mature institutional asset. However, retail "Social Liquidity" remains the primary driver of local volatility and blow-off tops. This script serves as a deterministic proxy for crowd conviction, utilizing the LUNARCRUSH:BTC_SENTIMENT feed to identify when social hype has decoupled from fundamental value.

Data Source: LunarCrush Integration
This model utilizes the native LunarCrush data prefix. Unlike simple "mention counts," the BTC_SENTIMENT metric is a percentage-based value (0-100%) representing the "Sentiment of positive posts weighted by interactions."
Interactions vs. Volume: By weighting sentiment by interactions (likes, shares, comments), the data filters out bot-driven "spam" and focuses on what real participants are actually engaging with.
Meaning of the Value: 100% indicates that every single interaction-weighted post is positive; 0% indicates total negativity. Historically, BTC sentiment rarely drops below 60% or stays above 90% for long, creating a predictable mean-reverting corridor.

Technical Architecture
The LSMA Denoising Engine Raw social data is inherently "jittery." To extract a tradable signal, we apply a Least Squares Moving Average (LSMA) with a 28-day lookback.
Mathematical Advantage: Unlike a Simple Moving Average (SMA), the LSMA calculates a linear regression line for each period to find the "best fit." This allows the indicator to track the velocity of sentiment shifts with significantly less lag, which is critical for identifying "Social Exhaustion" before a price reversal occurs.
The Social Heat Index (SHI) Calculation: To align this data with the broader Rob Maths ecosystem, we normalize the LSMA output into a standardized 0–10 score using a Linear Feature Scaling (Min-Max) formula: SHI = ((Current LSMA - 65) / 25) * 10 ; This formula treats 65% as the "Floor" (Apathy) and 90% as the "Ceiling" (Hysteria). This 0–10 scale allows for immediate comparison against other institutional risk metrics.

Regime Audits & Usage
Accumulation (Blue Zone / <72.5%): Social Despair. Retail interest is at a mathematical minimum. Historically, these periods of "Social Apathy" coincide with major local bottoms as institutional "Smart Money" absorbs the lack of retail demand.
Neutral Zone (Grey): Sustainable growth. Sentiment is within the normal distribution.
Distribution (Red Zone / >82.5%): Overheated. The crowd is in a state of maximum FOMO. When the SHI exceeds 8.5/10, the risk of a "Liquidity Flush" increases significantly.

Visual Scaling
To ensure the curve is readable, the indicator pane is hard-locked to a 65–90 scale. This prevents the "flat line" effect often seen in 0-100 oscillators and highlights the subtle divergences that occur at cycle peaks.

Disclaimer
Past performance does not guarantee future results. Social metrics are alternative data points and should be used in conjunction with price action and risk management. This is a mathematical model, not financial advice.

Tags
Rob Maths, Rob_Maths, robmaths, Bitcoin, Sentiment, LunarCrush, Quant, LSMA, OnChain, Social Liquidity

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน