OPEN-SOURCE SCRIPT
Aggiornato

BTC Mining Income Oscillator Z-Score

128
BTC Mining Income Oscillator (Z-Score)
Overview
The BTC Mining Income Oscillator (Z-Score) is a custom technical indicator that analyzes Bitcoin mining income to help traders identify overbought and oversold conditions. The indicator uses a Z-Score to track deviations in mining income, highlighting periods of high or low mining profitability.

This indicator is made up of:

Z-Score Line (Blue): Measures how far the current mining income deviates from its historical mean.

Mining Income Oscillator (Orange): A scaled value of mining income that oscillates within a specific range to indicate overbought and oversold conditions.

How the Indicator Works
1. Mining Income Calculation
The BTC Mining Income is determined using two main factors:

Block Reward: The number of BTC miners earn for each block mined (currently 3.125 BTC, adjustable in settings).

Transaction Fees: The average transaction fees per block (default is 0.3 BTC).

Blocks per Day: The number of blocks mined per day (default is 144).

The daily mining income in BTC is calculated as:

Mining Income
=
(
Block Reward
+
Transaction Fees
)
×
Blocks per Day
Mining Income=(Block Reward+Transaction Fees)×Blocks per Day
This value is then converted to USD by multiplying it by the current Bitcoin price.

2. Z-Score Calculation
The Z-Score measures how far the current mining income deviates from its mean over a set period (default is 90 days). The Z-Score helps identify when mining income is unusually high or low:

A high Z-Score indicates that the mining income is significantly above the historical mean, signaling overbought conditions.

A low Z-Score indicates that the mining income is significantly below the historical mean, signaling oversold conditions.

The Z-Score is calculated as follows:

Z-Score
=
(
Current Mining Income

Mean Income
)
Standard Deviation
Z-Score=
Standard Deviation
(Current Mining Income−Mean Income)


The result is then smoothed over a period (default is 5) to reduce noise and provide a more stable value.

3. Mining Income Oscillator
The mining income is scaled to oscillate between +20 and +90. This oscillation makes it easy to track overbought and oversold conditions in the market:

Values between 85 and 90 indicate overbought conditions (high mining profitability).

Values between 20 and 22 indicate oversold conditions (low mining profitability).

Values between 22 and 85 indicate neutral conditions, where mining profitability is normal.

The mining income oscillator helps traders spot extreme conditions (overbought or oversold) in mining profitability.

How to Read the Indicator
1. Z-Score Line (Blue)
The Z-Score represents how far current mining income is from the historical average.

Above +2: The mining income is unusually high, indicating an overbought market.

Below -2: The mining income is unusually low, indicating an oversold market.

Between -2 and +2: This range is neutral, where the mining income is within the average historical range.

2. Mining Income Oscillator (Orange)
The Mining Income Oscillator is scaled between 20 and 90.

85–90: Overbought conditions, indicating high mining profitability.

20–22: Oversold conditions, indicating low mining profitability.

22–85: Neutral conditions, indicating moderate mining profitability.

3. Background Shading
Red Shading (85–90): Indicates overbought conditions (mining income is unusually high).

Green Shading (20–22): Indicates oversold conditions (mining income is unusually low).

The shaded regions provide a visual guide to spot periods when the market is overbought or oversold.

4. Key Horizontal Lines
0 Line: Represents the neutral level for the Z-Score, where the mining income is at the historical mean.

+2 and -2 Lines: Indicate overbought and oversold conditions for the Z-Score.

90 and 20 Lines: Indicate the upper and lower bounds for the mining income oscillator.

Where the Data Comes From
Bitcoin Price: The current Bitcoin price is pulled directly from the chart.

Block Reward and Transaction Fees: These values are set manually by the user or can be updated dynamically.

Mining Income: Calculated based on the block reward, transaction fees, and current Bitcoin price.

Z-Score and Oscillator Calculations: Both are calculated based on mining income in USD over a defined look-back period.

Best Timeframe for This Indicator
This indicator is designed to work best on the 2-day chart (2D) timeframe. On the 2-day chart, the mining income data, Z-Score, and the oscillator are less sensitive to noise and short-term volatility, providing more reliable signals. While it can be used on other timeframes, the 2-day chart offers the clearest and most stable analysis.
Note di rilascio
📊 BTC Mining Income Oscillator Z-Score
This indicator visualizes the economic pressure and profitability of Bitcoin mining by converting estimated daily mining income into two key signals:

🔧 What it calculates
Daily Mining Income (USD):
Based on:

Block Reward (default: 3.125 BTC)

Average Fees per Block (default: 0.3 BTC)

Blocks per Day (fixed: 144)

BTC Price (from chart)

Formula:
(Block Reward + Fees) × Blocks/Day × BTC Price

📈 Main Outputs
Z-Score of Mining Income (blue line)

Shows how far current income deviates from its recent average.

Smoothed and clamped between -2 and +2 for stable interpretation.

Helps identify extreme overvaluation or undervaluation.

Scaled Income RSI-style (orange line)

Transforms income into a bounded range (20 to 90).

Smoothed for clarity.

Interpreted similarly to RSI:

Near 90 = income very high (possibly overvalued BTC)

Near 20 = income very low (possibly undervalued BTC)

🔍 How to read the Z-Score
Z = 0: income is near the recent average

Z > 1: income is significantly above average (miners earning more)

Z < -1: income is significantly below average (miners under pressure)

Z is capped at ±2 to avoid outlier distortions

🟩 Oversold & 🟥 Overbought Zones
Background highlights show extreme income conditions:

Green zone (20–22) = potentially oversold

Red zone (85–90) = potentially overbought

These zones may help identify reversal or mean-reversion opportunities based on mining stress.

📌 Use Cases
Spot long-term tops and bottoms in BTC price via miner income extremes

Gauge miner sentiment and pressure

Combine with on-chain or macro data for deeper context

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.