PROTECTED SOURCE SCRIPT
Telah dikemas kini STH-MVRV Bollinger Bands

STH-MVRV Bollinger Bands
🛠️ Detailes
This proprietary indicator seamlessly integrates on-chain data with advanced volatility metrics to construct adaptive Bollinger Bands that overlay directly on the price chart. Here’s a breakdown of its technical components:
Data Integration:
On-chain & Index Data: Utilizes BTC_MVRV (on-chain metric) and INDEX:BTCUSD (market index) to compute the STH-MVRV ratio.
Smoothing: Data series are smoothed with a configurable SMA (Simple Moving Average) over a user-defined period to reduce noise.
Ratio Computation:
Forms: Calculates three ratio variants:
STH-MVRV (MVRV)
STH-MVRV (Price)
STH-MVRV (AVG)
Dynamic Selection: The user can select the desired ratio from a dropdown menu.
Bollinger Bands Construction:
Basis & Deviation:
The basis is derived using the SMA of the selected ratio (or price, if substituted).
The standard deviation is scaled by a multiplier to form the upper and lower bands.
🟢 Green: When the selected ratio is ≥ 1 (bullish condition).
🔴 Red: When the selected ratio is < 1 (bearish condition).
Usage Recommendations:
Parameter Tuning: Adjust the moving average period, band length, and standard deviation multiplier to tailor the indicator to specific market conditions.
Multi-Timeframe Analysis: Combine with other technical indicators for a comprehensive risk management and trade execution strategy.
🛠️ Detailes
This proprietary indicator seamlessly integrates on-chain data with advanced volatility metrics to construct adaptive Bollinger Bands that overlay directly on the price chart. Here’s a breakdown of its technical components:
Data Integration:
On-chain & Index Data: Utilizes BTC_MVRV (on-chain metric) and INDEX:BTCUSD (market index) to compute the STH-MVRV ratio.
Smoothing: Data series are smoothed with a configurable SMA (Simple Moving Average) over a user-defined period to reduce noise.
Ratio Computation:
Forms: Calculates three ratio variants:
STH-MVRV (MVRV)
STH-MVRV (Price)
STH-MVRV (AVG)
Dynamic Selection: The user can select the desired ratio from a dropdown menu.
Bollinger Bands Construction:
Basis & Deviation:
The basis is derived using the SMA of the selected ratio (or price, if substituted).
The standard deviation is scaled by a multiplier to form the upper and lower bands.
🟢 Green: When the selected ratio is ≥ 1 (bullish condition).
🔴 Red: When the selected ratio is < 1 (bearish condition).
Usage Recommendations:
Parameter Tuning: Adjust the moving average period, band length, and standard deviation multiplier to tailor the indicator to specific market conditions.
Multi-Timeframe Analysis: Combine with other technical indicators for a comprehensive risk management and trade execution strategy.
Nota Keluaran
STH-MVRV Bollinger Bands🛠️ Detailes
This proprietary indicator seamlessly integrates on-chain data with advanced volatility metrics to construct adaptive Bollinger Bands that overlay directly on the price chart. Here’s a breakdown of its technical components:
1. On‑Chain & Price Inputs
BTC_MVRV (D): The daily short‑term holder Market‑Value‑to‑Realized‑Value ratio, pulled via request.security('BTC_MVRV','D',close).
BTCUSD Index (D): Daily spot price from INDEX:BTCUSD.
2. 155‑Day SMA (“MVRV 155”)
We apply a 155‑day Simple Moving Average to each series:
Pine Script®
mvrv_MA = ta.sma(btcMVRV, 155) // Smooths MVRV over ~155 trading days (~7 calendar months)
price_MA = ta.sma(btcPrice, 155) // Same lookback on price
Why 155? Empirically, a 155‑day window captures medium‑term on‑chain holder cycles and aligns with typical quarterly rebalancing periods.
3. Normalized Ratios (STH‑MVRV)
After smoothing:
Pine Script®
sthMVRV_onchain = btcMVRV / mvrv_MA // Deviation of on‑chain value from its 155‑day mean
sthMVRV_price = btcPrice / price_MA // Price’s deviation from its 155‑day mean
sthMVRV_avg = math.avg(sthMVRV_onchain, sthMVRV_price)
Interpretation:
Values > 1.0 indicate the series is above its 155‑day trend (over‑extended).
Values < 1.0 indicate below‑trend conditions (potential undervaluation).
4. Adaptive Bollinger Bands on STH‑MVRV
Basis: N‑period SMA of whichever ratio you pick (default 20 days):
Pine Script®
basis = ta.sma(selectedSTH, bbLen=20)
Volatility: Standard deviation over the same window, scaled by a multiplier (default 2.0):
Pine Script®
dev = bbStdMult * ta.stdev(selectedSTH, bbLen)
upper = basis + dev
lower = basis - dev
Gradient Zones: Ten equidistant fills between each band and the basis to visually grade how far you are into an extreme.
5. Color Logic & Signals
Bullish (≥ 1.0): Teal/green fills when the ratio or its bands sit above 1.0.
Bearish (< 1.0): Red fills below 1.0.
1.0 Reference: A dotted horizontal line marks the “fair‑value” SMA crossover.
6. Sample Entry/Exit Triggers
Pine Script®
// Long entry: ratio touches or crosses below lower band in bearish zone
if ta.crossunder(selectedSTH, lower) and selectedSTH < 1
label.new(bar_index, lower, "Mean Reversion Buy", color=color.red)
// Short entry (or profit‑taking): ratio crosses above upper band in bullish zone
if ta.crossover(selectedSTH, upper) and selectedSTH > 1
label.new(bar_index, upper, "Overextension Sell", color=color.teal)
🟢 Green: When the selected ratio is ≥ 1 (bullish condition).
🔴 Red: When the selected ratio is < 1 (bearish condition).
Usage Recommendations:
Parameter Tuning: Adjust the moving average period, band length, and standard deviation multiplier to tailor the indicator to specific market conditions.
Multi-Timeframe Analysis: Combine with other technical indicators for a comprehensive risk management and trade execution strategy.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
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 dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
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.