OPEN-SOURCE SCRIPT
Stochastic Heat Map

Overview
The Darwin Stochastic Heat Map is a multi-timeframe momentum oscillator designed to visualize market saturation and trend exhaustion. Instead of relying on a single lookback period, this indicator simultaneously calculates 28 different Stochastic Oscillator lengths and plots them as a seamless, gradient-filled heatmap background.
By combining this macro-level view with a Williams VIX Fix (WVF) pressure engine and a real-time dashboard, traders can easily spot underlying divergences between price action, momentum, and volatility.
How the Core Math Works
The 28-Level Heat Map: The script calculates 28 separate Stochastic values based on incrementally increasing lookback periods (from fast 10-bar lookbacks up to macro 160-bar lookbacks).
Deep Red (Boiling): The asset is completely overbought across multiple timeframes (>75).
Yellow/Orange (Warming): The asset is in a neutral or transition zone.
Deep Green (Freezing): The asset is completely oversold across multiple timeframes (<25).
Fast & Slow Momentum Lines: The indicator calculates the mathematical average of all 28 stochastic levels. It then plots a Fast moving average (colored based on extremes) and a Slow moving average (default EMA) of that total average. When the Fast line crosses the Slow line, it indicates a shift in aggregate momentum.
The WVF Pressure Engine: To filter out the noise of 1-tick price fluctuations, the script utilizes a modified Williams VIX Fix (WVF) logic. It measures the distance between the highest close and the current low over a 22-bar period (Bearish Pressure), and compares it to the lowest close and the current high (Bullish Pressure). This provides a smoothed, "sticky" trend filter that ignores minor chop.
The Real-Time Dashboard
To save screen space and mental energy, the built-in HUD (Heads Up Display) calculates the background math in real-time:
Macro Temp: The exact average of all 28 Stochastic arrays.
Saturation: A raw count of how many of the 28 individual levels are currently pinned in the overbought or oversold extremes.
WVF Pressure: Displays whether the underlying volatility favors the Bulls or the Bears based on the 22-period WVF logic.
True Signal: A custom divergence engine that compares the Macro Temp to the WVF Pressure. For example, if the heatmap is boiling Red (Macro Overbought), but the WVF Pressure flips to Bearish, the dashboard will trigger a "BEARISH DIVERGENCE (SHORT)" alert.
How to Use It
Avoid the Chop: When the background is yellow/orange and the Saturation spread is mixed, the market is range-bound.
Catch the Reversal: Look for the entire background to flush Deep Red or Deep Green. Once you have a fully saturated background, wait for the Dashboard's "True Signal" to spot a divergence, or wait for the Fast Line to confidently cross the Slow Line to time your entry.
Trend Riding: If the WVF Pressure is firmly Bullish and the Fast Line remains above the Slow line, use short-term dips (green flashes at the bottom of the heatmap) as potential continuation entries.
Disclaimer: This script is for educational and analytical purposes only. It is not financial advice. Always use proper risk management and pair this tool with your own market analysis.
The Darwin Stochastic Heat Map is a multi-timeframe momentum oscillator designed to visualize market saturation and trend exhaustion. Instead of relying on a single lookback period, this indicator simultaneously calculates 28 different Stochastic Oscillator lengths and plots them as a seamless, gradient-filled heatmap background.
By combining this macro-level view with a Williams VIX Fix (WVF) pressure engine and a real-time dashboard, traders can easily spot underlying divergences between price action, momentum, and volatility.
How the Core Math Works
The 28-Level Heat Map: The script calculates 28 separate Stochastic values based on incrementally increasing lookback periods (from fast 10-bar lookbacks up to macro 160-bar lookbacks).
Deep Red (Boiling): The asset is completely overbought across multiple timeframes (>75).
Yellow/Orange (Warming): The asset is in a neutral or transition zone.
Deep Green (Freezing): The asset is completely oversold across multiple timeframes (<25).
Fast & Slow Momentum Lines: The indicator calculates the mathematical average of all 28 stochastic levels. It then plots a Fast moving average (colored based on extremes) and a Slow moving average (default EMA) of that total average. When the Fast line crosses the Slow line, it indicates a shift in aggregate momentum.
The WVF Pressure Engine: To filter out the noise of 1-tick price fluctuations, the script utilizes a modified Williams VIX Fix (WVF) logic. It measures the distance between the highest close and the current low over a 22-bar period (Bearish Pressure), and compares it to the lowest close and the current high (Bullish Pressure). This provides a smoothed, "sticky" trend filter that ignores minor chop.
The Real-Time Dashboard
To save screen space and mental energy, the built-in HUD (Heads Up Display) calculates the background math in real-time:
Macro Temp: The exact average of all 28 Stochastic arrays.
Saturation: A raw count of how many of the 28 individual levels are currently pinned in the overbought or oversold extremes.
WVF Pressure: Displays whether the underlying volatility favors the Bulls or the Bears based on the 22-period WVF logic.
True Signal: A custom divergence engine that compares the Macro Temp to the WVF Pressure. For example, if the heatmap is boiling Red (Macro Overbought), but the WVF Pressure flips to Bearish, the dashboard will trigger a "BEARISH DIVERGENCE (SHORT)" alert.
How to Use It
Avoid the Chop: When the background is yellow/orange and the Saturation spread is mixed, the market is range-bound.
Catch the Reversal: Look for the entire background to flush Deep Red or Deep Green. Once you have a fully saturated background, wait for the Dashboard's "True Signal" to spot a divergence, or wait for the Fast Line to confidently cross the Slow Line to time your entry.
Trend Riding: If the WVF Pressure is firmly Bullish and the Fast Line remains above the Slow line, use short-term dips (green flashes at the bottom of the heatmap) as potential continuation entries.
Disclaimer: This script is for educational and analytical purposes only. It is not financial advice. Always use proper risk management and pair this tool with your own market analysis.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
*PM me after for access.*
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
*PM me after for access.*
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。