OPEN-SOURCE SCRIPT
RHODL Z-Score [TheSnake3Run]

The original RHODL Ratio, created by Philip Swift, is an on-chain metric that compares the cost basis of coins last moved in the past week against the cost basis of coins last moved 1–2 years ago, weighted by total market age. It identifies macro cycle tops and bottoms in Bitcoin. The true metric requires UTXO-level realized-cap data not available inside Pine Script, so this indicator approximates the dynamic using price alone and standardises the output as a z-score.
How the calculation works
1. Short cohort — 7-bar SMA of price (≈ 1 week on daily). Proxy for recently-transacted cost basis.
2. Long cohort — SMA of price from 365 to 730 bars ago (≈ 1–2 years back). Proxy for long-term holder cost basis.
3. Ratio — short ÷ long. Above 1 means recent price is elevated versus long-term basis.
4. Age weighting — ratio × bar index, mirroring RHODL's market-age adjustment, then log-transformed.
5. Z-score — the log value is normalised against its own 365-bar rolling mean and standard deviation. The plot shows how many standard deviations the current reading sits from its one-year average.
How to read it
Above +2 — stretched high; overheated. Shaded red.
−1 to +1 — normal range.
Below −2 — stretched low; accumulation. Shaded green.
How the calculation works
1. Short cohort — 7-bar SMA of price (≈ 1 week on daily). Proxy for recently-transacted cost basis.
2. Long cohort — SMA of price from 365 to 730 bars ago (≈ 1–2 years back). Proxy for long-term holder cost basis.
3. Ratio — short ÷ long. Above 1 means recent price is elevated versus long-term basis.
4. Age weighting — ratio × bar index, mirroring RHODL's market-age adjustment, then log-transformed.
5. Z-score — the log value is normalised against its own 365-bar rolling mean and standard deviation. The plot shows how many standard deviations the current reading sits from its one-year average.
How to read it
Above +2 — stretched high; overheated. Shaded red.
−1 to +1 — normal range.
Below −2 — stretched low; accumulation. Shaded green.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。