OPEN-SOURCE SCRIPT
Institutional ROC + Z-Score Heatmap

Institutional ROC + Z-Score Heatmap
Identifies statistically significant daily price moves by calculating the z-score of the rate of change (ROC) against a configurable historical lookback period. Designed for cross-asset regime monitoring and volatility detection.
How it works:
Calculates the daily percentage change (ROC)
Compares that move to the historical distribution of daily moves
Expresses the result as a z-score (standard deviations from the mean)
Color coding:
Teal: Extreme positive move (>3σ) — rare upside, potential blowoff top
Red: Extreme negative move (<-3σ) — rare downside, potential capitulation
Orange/Lime: Warning zone (2-3σ) — unusual but not extreme
Gray: Normal volatility — nothing actionable
Use cases:
Identify regime shifts across asset classes (equities, crypto, commodities)
Spot potential mean-reversion setups after extreme moves
Monitor cross-asset risk appetite (BTC, XBI, SPY) for tactical hedging signals
Recommended settings:
ROC Length: 1 (daily moves)
Lookback: 252 (1 year) for stable assets, 60-90 for volatile biotech
Identifies statistically significant daily price moves by calculating the z-score of the rate of change (ROC) against a configurable historical lookback period. Designed for cross-asset regime monitoring and volatility detection.
How it works:
Calculates the daily percentage change (ROC)
Compares that move to the historical distribution of daily moves
Expresses the result as a z-score (standard deviations from the mean)
Color coding:
Teal: Extreme positive move (>3σ) — rare upside, potential blowoff top
Red: Extreme negative move (<-3σ) — rare downside, potential capitulation
Orange/Lime: Warning zone (2-3σ) — unusual but not extreme
Gray: Normal volatility — nothing actionable
Use cases:
Identify regime shifts across asset classes (equities, crypto, commodities)
Spot potential mean-reversion setups after extreme moves
Monitor cross-asset risk appetite (BTC, XBI, SPY) for tactical hedging signals
Recommended settings:
ROC Length: 1 (daily moves)
Lookback: 252 (1 year) for stable assets, 60-90 for volatile biotech
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.