OPEN-SOURCE SCRIPT
Smooth BTCSPL [GiudiceQuantico] – Dual Smoothed MAs

Smooth BTCSPL – Dual Smoothed MAs
What it measures
• % of Bitcoin addresses in profit vs loss (on-chain tickers).
• Spread = profit % − loss % → quick aggregate-sentiment gauge.
• Optional alpha-decay normalisation ⇒ keeps the curve on a 0-1 scale across cycles.
User inputs
• Use Alpha-Decay Adjusted Input (true/false).
• Fast MA – type (SMA / EMA / WMA / VWMA) & length (default 100).
• Slow MA – type & length (default 200).
• Colours – Bullish (#00ffbb) / Bearish (magenta).
Computation flow
1. Fetch daily on-chain series.
2. Build raw spread.
3. If alpha-decay enabled:
alpha = (rawSpread − 140-week rolling min) / (1 − rolling min).
4. Smooth chosen base with Fast & Slow MAs.
5. Bullish when Fast > Slow, bearish otherwise.
6. Bars tinted with the same bull/bear colour.
How to read
• Fast crosses above Slow → rising “addresses-in-profit” momentum → bullish bias.
• Fast crosses below Slow → stress / capitulation risk.
• Price-indicator divergences can flag exhaustion or hidden accumulation.
Tips
• Keep in a separate pane (overlay = false); bar-colouring still shows on price chart.
• Shorter lengths for swing trades, longer for macro outlook.
• Combine with funding rates, NUPL or simple price-MA crossovers for confirmation.
What it measures
• % of Bitcoin addresses in profit vs loss (on-chain tickers).
• Spread = profit % − loss % → quick aggregate-sentiment gauge.
• Optional alpha-decay normalisation ⇒ keeps the curve on a 0-1 scale across cycles.
User inputs
• Use Alpha-Decay Adjusted Input (true/false).
• Fast MA – type (SMA / EMA / WMA / VWMA) & length (default 100).
• Slow MA – type & length (default 200).
• Colours – Bullish (#00ffbb) / Bearish (magenta).
Computation flow
1. Fetch daily on-chain series.
2. Build raw spread.
3. If alpha-decay enabled:
alpha = (rawSpread − 140-week rolling min) / (1 − rolling min).
4. Smooth chosen base with Fast & Slow MAs.
5. Bullish when Fast > Slow, bearish otherwise.
6. Bars tinted with the same bull/bear colour.
How to read
• Fast crosses above Slow → rising “addresses-in-profit” momentum → bullish bias.
• Fast crosses below Slow → stress / capitulation risk.
• Price-indicator divergences can flag exhaustion or hidden accumulation.
Tips
• Keep in a separate pane (overlay = false); bar-colouring still shows on price chart.
• Shorter lengths for swing trades, longer for macro outlook.
• Combine with funding rates, NUPL or simple price-MA crossovers for confirmation.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
GQ
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
GQ
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.