OPEN-SOURCE SCRIPT
BTC - Sentiment (Posts weighted) LSMA

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
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
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.