OPEN-SOURCE SCRIPT
ที่อัปเดต:

Supply In Profit Z-Score | Wave Background

303
Supply in Profit Z-Score

Modified by Quant_Hustler | Original by QuantChook

What it does


The Supply in Profit Z-Score measures how extreme the balance is between BTC addresses in profit versus those in loss compared to historical norms.
It highlights periods of excessive optimism or pessimism, helping traders identify market sentiment extremes that can signal potential turning points or confirm ongoing trends.
This version is designed for longer-term strategies, using smoothing and statistical normalization to focus on broader market sentiment cycles rather than short-term noise.

How it works

--Data Retrieval: Pulls on-chain data showing the percentage of Bitcoin addresses currently in profit and in loss.

--Spread Calculation: Finds the difference between the two to gauge overall sentiment balance.

--Alpha Decay Adjustment (optional): Normalizes extreme values to stabilize the signal over time.

--Smoothing: Applies a moving average to filter daily volatility and improve long-term clarity.

--Z-Score Conversion: Standardizes the data to show how far current sentiment deviates from historical averages.

--Visualization: Plots the result around a neutral midpoint (zero line) — positive values indicate profit dominance, negative values indicate loss dominance.

How to use it

--Above Zero: More addresses in profit → bullish sentiment and strong trend conditions.

--Below Zero: More addresses in loss → bearish sentiment or potential accumulation zones.

--Extreme Values: Mark overly optimistic or capitulated sentiment, often preceding major reversals.

Why use it in trend following

--This indicator serves as an on-chain sentiment confirmation layer for trend-following systems, especially on higher timeframes (daily or weekly).

--In uptrends, sustained positive readings confirm market strength and investor confidence.

--In downtrends, persistent negative readings confirm weakness and help avoid false reversal signals.

--Divergences between price and sentiment (e.g., rising price but weakening sentiment) often signal momentum loss or potential trend transitions.

Modifications from the original by QuantChook

Added EMA, adaptive Z-score smoothing and capping to reduce volatility and noise.

Introduced a wave-style visualization for intuitive sentiment shifts.

Improved calculation structure and upgraded for Pine Script v6 efficiency.

Tuned signal responsiveness and smoothing parameters for long-term trend accuracy.

Simplified user inputs and grouping for easier customization and integration.

In summary:
A refined, statistically grounded on-chain sentiment oscillator — originally developed by QuantChook and enhanced by Quant_Hustler — built to support long-term trend-following strategies by quantifying Bitcoin market sentiment through real-time profit and loss dynamics.
เอกสารเผยแพร่
Supply in Profit Z-Score

Modified by Quant_Hustler | Original by QuantChook

Tracks the balance between BTC addresses in profit vs. in loss to highlight extreme market sentiment. Designed for long-term strategies, it shows when the market is unusually bullish or bearish, helping spot trend strength, reversals, and cycle shifts.

How it works (calculations explained):

Pulls on-chain data for the percentage of BTC addresses in profit and in loss.

Calculates the profit-loss spread by subtracting loss percentage from profit percentage.

Optionally applies alpha decay normalization to scale extreme values relative to historical lows.

Smooths the resulting series using a moving average to reduce short-term volatility.

Converts the smoothed series into a Z-score, which shows how far current sentiment deviates from its historical average.

Plots the result around a neutral midpoint: above zero = bullish, below zero = bearish.

Usage:

Above zero: Trend continuation likely.

Below zero: Weakness or accumulation.

Extreme values: Overbought/oversold zones, possible reversals.

Modifications from original:

Adaptive Z-score smoothing and capping

Alpha decay normalization for long-term stability

Wave-style visualization for intuitive sentiment reading

Tuned smoothing and responsiveness for long-term trend tracking

Streamlined user inputs for easier customization

Summary:
A refined on-chain sentiment oscillator, enhanced for long-term trend-following, showing BTC holder conviction through profit and loss dynamics.

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

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