OPEN-SOURCE SCRIPT
Güncellendi

BitcoinOnChain

271
WHAT IT IS

BitcoinOnChain reads the Bitcoin network rather than the price chart. It pulls six on-chain metrics from the Glassnode feeds on TradingView, scores each against its own recent history, and blends them into one line called ChainPulse, shown in MACD form with a composite line, a signal line, a histogram and an information table.

The purpose is context. Price shows what the market did; these metrics describe what the network did underneath it - who transacted, whether coins moved at a profit or a loss, whether miners stayed committed, whether new users arrived. When the two stories disagree, that disagreement is the thing worth seeing.

THE METHOD

Raw on-chain numbers are hard to read directly. Whether 654,000 active addresses is a lot depends entirely on the last few months, so nothing here is compared to a fixed level. Each metric is percentile ranked over its own trailing window, 90 periods by default, and mapped onto a scale from -100 to +100. Zero means the metric sits at its own median; positive is healthier than its recent norm, negative is weaker. That is what lets one setting work across different price regimes.

The six scores are blended using adjustable weights, defaulting to SOPR 25, Active Addresses 20, New Addresses 15, Transaction Fees 15, Hash Rate 15 and Sending Addresses 10. The blend is smoothed into ChainPulse; smoothing that again gives the signal line, and the gap between them is the histogram.

Two metrics are handled specially. SOPR is ranked on its distance from 1.0 rather than its level, because 1.0 is its natural breakeven. Sending Addresses is inverted before blending, since heavy spending is treated as distribution rather than health.

THE SIX METRICS

SOPR, the Spent Output Profit Ratio, shows whether coins moving on the network are spent at a profit or a loss. Above 1.0 the average coin sold for more than it was acquired for; below 1.0, for less. Sustained readings under 1.0 describe holders realising losses. It carries the heaviest default weight.

Active Addresses counts unique addresses transacting, a direct read on participation. Participation holding up while price falls is a different situation from participation falling with it.

New Addresses counts first-time addresses, standing in for the rate of fresh adoption.

Transaction Fees, in dollars, measures demand for limited block space. Fees rise when people will pay to transact and fall when the network is quiet.

Hash Rate measures the computing power securing the network, standing in for miner commitment.

Sending Addresses counts addresses spending Bitcoin, and is the one metric scored in reverse: heavy movement out is treated as distribution, so a high reading pushes the composite down.

READING THE CHART

The histogram is the gap between ChainPulse and its signal, drawn in four states: gold above zero, blue below, bright while the gap widens and faded while it narrows. The fade softens before the histogram crosses zero.

ChainPulse is the thick white line, the lime green line is its signal, and the gold line across the middle is zero. The shading between ChainPulse and zero grows more solid the further the composite sits from normal.

Circular dots mark crosses between ChainPulse and its signal and are deliberately restrictive: a dot prints only when both lines are still on the same side of zero and the histogram is expanding, so a cross up marks a recovery beginning from weak territory and a cross down marks deterioration beginning from strong territory. They describe turns in on-chain flow, not trade instructions.

Green and red triangles mark divergence between price and ChainPulse: green where price made a lower low while the composite made a higher low, red for the mirror. Pivots define those highs and lows, defaulting to five bars left, three right, with a maximum reach of twenty four bars between compared pivots.

THE INFORMATION TABLE

Five columns, ten rows, placeable in any of nine positions.

The top row summarises: the labels BTC and ONCHAIN, then a regime word, the composite value, and a feed count. The regime word comes from the composite, reading STRONG at 50 or above, HEALTHY from 20 to 50, NEUTRAL between -20 and +20, WEAK down to -50 and STRESSED below that. The last cell shows how many of the six metrics are reporting; anything under six out of six means a feed has stopped and the composite is running on the rest.

The second row holds the headline numbers. Comp is ChainPulse, Signal is its signal line, and the last cell is the histogram, Comp minus Signal.

The third row holds the column headings for the six metric rows beneath: Metric, Raw, Score, Rank and Contrib.

Each metric row shows Raw, the measurement in its own units, with SOPR to four decimals, address counts and fees abbreviated in thousands and hash rate in exahashes per second; Score, the normalised -100 to +100 reading; Rank, the underlying percentile, so 70 percent means it sits above 70 percent of its own readings in the window; and Contrib, how many points that metric contributes to the composite given its weight. Score and Rank describe the same thing two ways, with one exception: Sending Addresses is inverted, so a rank above 50 percent beside a negative score is expected. The six Contrib values add up to the composite before smoothing, so the column shows directly which metrics are moving the number. A metric whose feed has stopped shows DEAD there and is excluded from the blend.

The bottom row covers timing. Div reports a recent divergence as BULL, BEAR or a dash. Last X reports how many bars since the most recent cross dot, and whether it was a buy or sell type.

SETTINGS AND DATA

The lookback, on-chain resolution, all six weights, divergence and pivot settings, smoothing lengths, colours and table position are adjustable, and any weight can be set to zero to drop that metric. A dead feed guard, on by default, removes a non-reporting metric from the blend and rescales the rest, because a missing value read as zero would rank at the bottom of its history and look like an extreme bearish reading when nothing had happened. Eleven alert conditions cover the cross dots, zero line crosses, strong and stressed readings, SOPR extremes, both divergences and a feed failure warning.

Data comes from the Glassnode feeds carried on TradingView, and availability depends on your account. On-chain data updates far less often than price: at the default daily resolution these values change once a day, so an intraday chart holds the same reading all session. Requests use a one bar shift with lookahead disabled, so history does not repaint. Divergence markers are the exception by design, since a pivot cannot be confirmed until the required bars have printed after it. The triangle is placed on the pivot it describes but appears only once those bars complete, while the exported divergence values are stamped on the confirmation bar, showing when the divergence could actually have been known.

LIMITATIONS

This is built for Bitcoin. The feeds are Bitcoin network metrics, so applying it to another symbol shows Bitcoin data beside an unrelated price series. On-chain metrics describe network conditions; they do not measure or forecast price, and there are long stretches where the network reads healthy while price falls, or the reverse. Every score is relative to the chosen lookback, so a metric can rank high simply because the recent past was quiet, which is why the Rank column is always shown.

This script is a research and analysis tool. It is not financial advice, not a recommendation to buy or sell, and not a signal service. The dots and triangles describe what the data has already done. No indicator predicts future price. Do your own research and manage your own risk.
Sürüm Notları
Cosmetic
Sürüm Notları
Cosmetic
Sürüm Notları
Cosmetic
Sürüm Notları
cosmetic

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.