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.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
*PM me after for access.*
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
*PM me after for access.*
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.