OnChain-PurpleBitcoin / US DollarCOINBASE:BTCUSDtrungducbr93//@version=5 indicator("Realized Price + MVRV + NUPL (Top Coin Dashboard) – anh Đức edition", overlay=false, max_lines_count=500, max_labels_count=500) // === INPUTS === coinTicker = input.symbol("BINANCE:BTCUSD", "Select Coin (BTC/ETH/SOL/ADA/BNB/XRP)") // === REALIZED PRICE === // Data approximated using long-term moving average to simulate on-chain cost basis rp = request.security(coinTicker, "1W", ta.sma(close, 200)) plot(rp, color=color.new(#8A6BBE, 0), linewidth=2, title="Realized Price") // === MVRV RATIO (Market Value / Realized Value) === // Proxy calculation using price deviation vs long MA (approximation for on-chain) mvrv = close / rp plot(mvrv, color=color.new(#C49BFF, 0), title="MVRV Ratio", style=plot.style_histogram, transp=20) // === NUPL (Net Unrealized Profit/Loss) === // Derived approximation using normalized difference between price & realized price nupl = (close - rp) / close plot(nupl, color=color.new(#E6C6FF, 0), style=plot.style_area, title="NUPL (approx.)", transp=40) // === ZONE BACKGROUND === bgcolor(nupl > 0.5 ? color.new(#B19CD9, 80) : nupl < 0 ? color.new(#3A255D, 80) : na) // === LABELS === if (barstate.islast) label.new(bar_index, rp, "Realized Price", style=label.style_label_left, color=color.new(#8A6BBE, 0), textcolor=color.white) // === INFO === plotchar(nupl > 0.5, title="Euphoria Zone", char="▲", location=location.bottom, color=color.new(#E6C6FF, 0)) plotchar(nupl < 0, title="Capitulation Zone", char="▼", location=location.top, color=color.new(#3A255D, 0))