OPEN-SOURCE SCRIPT
BTC Correlation - short club

BTC Correlation % — Indicator Description
Author: Short Club / DemianNagoga
Version: Pine Script v6
Type: Indicator (non-overlay, separate pane)
Overview
The BTC Correlation % indicator measures how closely an altcoin's price movements follow Bitcoin in real time. It uses Pearson correlation on 1-bar rate-of-change (RoC) values over a configurable lookback window, giving you a clear signal of whether the altcoin is riding BTC's coattails or moving independently.
How It Works
RoC Calculation — Computes the 1-bar % change for both the current chart symbol and BTC.
Pearson Correlation — Runs ta.correlation() over the user-defined lookback (default 50 bars).
Percentage Scale — Multiplies the correlation coefficient by 100, yielding a range from −100% to +100%.
Color-Coded Columns — The histogram is split into four segments, each plotted as a separate column-style plot for clean color separation.
Color Zones & Interpretation
Zone Range Meaning
🟢 Green > 70% High correlation — altcoin closely follows BTC
🟡 Yellow 30–70% Moderate correlation — partial BTC influence
⚪ Gray 0–30% Weak correlation / decoupling — altcoin lives its own life
🔴 Red < 0% Inverse correlation — altcoin moves opposite to BTC
A dashed zero line sits at 0% for visual reference.
On-Chart Table
A small overlay table (position configurable: top-right, top-left, bottom-right, bottom-left) displays:
Ticker — current chart symbol
BTC Corr. — current correlation value in % (color-coded by zone)
Rating — qualitative label: Strong (>70%), Moderate (30–70%), Weak (0–30%), Inverse (<0%)
Input Parameters
Parameter Default Description
BTC Symbol BINANCE:BTCUSDT.P BTC pair used as benchmark
Correlation Lookback 50 Number of bars for Pearson correlation
Show Table true Toggle the on-chart info table
Show Correlation Line true Toggle the histogram columns
Table Position top_right Placement of the info table
Use Cases
Altcoin scalping — Know instantly whether your alt is following BTC or running on its own catalyst.
Decoupling detection — Gray zone = potential breakout candidate independent of BTC direction.
Hedging signals — Red zone (inverse) = altcoin moving opposite to BTC; useful for pairs or hedging.
Swing context — Avoid fading BTC trend on a highly-correlated alt; size down when correlation drops.
Credits
Built for the Short Club community. If you reuse or build upon this script, please credit @DemianNagoga.
Author: Short Club / DemianNagoga
Version: Pine Script v6
Type: Indicator (non-overlay, separate pane)
Overview
The BTC Correlation % indicator measures how closely an altcoin's price movements follow Bitcoin in real time. It uses Pearson correlation on 1-bar rate-of-change (RoC) values over a configurable lookback window, giving you a clear signal of whether the altcoin is riding BTC's coattails or moving independently.
How It Works
RoC Calculation — Computes the 1-bar % change for both the current chart symbol and BTC.
Pearson Correlation — Runs ta.correlation() over the user-defined lookback (default 50 bars).
Percentage Scale — Multiplies the correlation coefficient by 100, yielding a range from −100% to +100%.
Color-Coded Columns — The histogram is split into four segments, each plotted as a separate column-style plot for clean color separation.
Color Zones & Interpretation
Zone Range Meaning
🟢 Green > 70% High correlation — altcoin closely follows BTC
🟡 Yellow 30–70% Moderate correlation — partial BTC influence
⚪ Gray 0–30% Weak correlation / decoupling — altcoin lives its own life
🔴 Red < 0% Inverse correlation — altcoin moves opposite to BTC
A dashed zero line sits at 0% for visual reference.
On-Chart Table
A small overlay table (position configurable: top-right, top-left, bottom-right, bottom-left) displays:
Ticker — current chart symbol
BTC Corr. — current correlation value in % (color-coded by zone)
Rating — qualitative label: Strong (>70%), Moderate (30–70%), Weak (0–30%), Inverse (<0%)
Input Parameters
Parameter Default Description
BTC Symbol BINANCE:BTCUSDT.P BTC pair used as benchmark
Correlation Lookback 50 Number of bars for Pearson correlation
Show Table true Toggle the on-chart info table
Show Correlation Line true Toggle the histogram columns
Table Position top_right Placement of the info table
Use Cases
Altcoin scalping — Know instantly whether your alt is following BTC or running on its own catalyst.
Decoupling detection — Gray zone = potential breakout candidate independent of BTC direction.
Hedging signals — Red zone (inverse) = altcoin moving opposite to BTC; useful for pairs or hedging.
Swing context — Avoid fading BTC trend on a highly-correlated alt; size down when correlation drops.
Credits
Built for the Short Club community. If you reuse or build upon this script, please credit @DemianNagoga.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.