OPEN-SOURCE SCRIPT

Hourly Volatility Heatmap [ZynAlgo]

2 153
1. Overview
Most reversal tools look only at the candle. Hourly Volatility Heatmap starts with the clock: it keeps a rolling record of how each hour of the day behaves - how much range it produces, how often it prints the day's high or low, and whether it leans bullish or bearish - and turns that record into a 24-cell heat table. Signals are allowed only inside the hottest hours: a sweep of a recent swing high or low that gets rejected on the close, optionally confirmed by the hour's directional bias and an RSI divergence, prints a marker with the reason on hover.
snapshot

2. How It Reads The Trading Day
  • A panel titled "HOURLY VOLATILITY HEATMAP" in the corner you choose, with an insight line "Vol peak: HH:00 | Reversal peak: HH:00".
  • A 6x4 grid of the 24 hours, each cell shaded from dark navy (cold) through amber (mid) to red (hot) by its Hot Hour score.
  • A "TOP 5" table with Rank, Time (in your timezone), Avg. Vol, Reversal % and Bull Bias.
  • Common mistake: a red cell means high activity and turning-point frequency, NOT a direction. Only the Bull Bias column is directional, and it gates the signal rather than forecasting.

snapshot

3. How The Hot Hour Score Is Defined
  • Timezone (UTC Offset) - every bar is stamped with its hour in the zone you select.
  • Lookback Days - the rolling window of completed days (default 30); stats rebuild at the start of each new day.
  • Average range per hour - the high-to-low range of each bar, in points, averaged per hour across the window.
  • Reversal % - how often that hour held the day's high or low across the window.
  • Hot Hour score - average range and Reversal % are each scaled 0-100 against the best hour, then averaged. Hot Hours Filter (Top N by combined score) sets how many top-ranked hours may signal (default 5).
  • Bull Bias - the share of tracked hourly candles in that slot that closed above their open, used by Enable Directional Bias Filter.
  • Swing Length and RSI Length - define the structure sweep and the divergence check used in the signal rules.


4. Signal Rules
  • BUY (all required on a closed bar): the current hour is one of the Top N hot hours; the bar's low reaches or breaks the lowest low of the previous Swing Length bars and closes above its open (a rejected sweep); if the Directional Bias Filter is on, the hour's Bull Bias is at or above 50%; if the RSI Divergence Filter is on, RSI on this bar is higher than RSI was at the swept low; the cooldown has elapsed.
  • SELL is the mirror image on the high side.
  • The marker prints on the NEXT bar (its open is the entry reference); the stop reference is the extreme of the sweep bar. Hover the marker to read the exact reason, e.g. "Buy: 14:00 (UTC) is a Top 5 hot hour. (Bias Check: 58.3% Bullish) [RSI Divergence Confirmed] Price made a 5-bar low and rejected."

snapshot

5. Trade Mode (Master Switch)
  • OFF (default) - chart shows markers and hover tooltips only; Stability Mode and Smart Signal Filter are bypassed; no SL/TP boxes, no Win Rate/PF tracking.
  • ON - each marker becomes a tracked position: a red-tinted risk box (entry to stop), a green-tinted reward box (entry to the final target: TP3 if enabled, else TP2, else TP1), a dotted entry line and a dotted stop line that steps to breakeven after TP1 and to TP1 after TP2. Small "TP1"/"TP2" tags mark those moments, a red "x" marks a clean stop-out, and Max Trade Duration (Bars) closes a stale position. The panel adds Trades (total tracked) and Win Rate / PF rows.
  • Stability Mode (no new signal while a trade is open) and Smart Signal Filter (force alternating Buy/Sell) then gate new entries; Max Stored Trade Records (history) caps the drawings kept.

snapshot

6. Who It's For
  • Session-aware intraday traders who want the hour filter backed by the instrument's own numbers, not a fixed session template.
  • Liquidity-sweep and reversal traders - a run through a recent high or low that fails, filtered here by time, seasonal bias and momentum.
  • Traders on 24-hour markets: forex, gold, index CFDs and crypto all have hours that concentrate range and turning points.
  • Traders who prefer fewer, better-timed marks - the hot-hour gate, bias check and cooldown remove most sweeps that occur in dead hours.

The tool needs intraday bars to build its hourly statistics, so use it on hourly and lower timeframes. A marker is a well-timed candidate, not an order.
snapshot

7. Notes
  • The Trades / Win Rate / Profit Factor figures come from an internal, non-executed simulation over the visible chart history - a study of the settings on past data, not a backtest, not a broker report, and not indicative of future results.
  • All signal logic processes fully closed bars only, never a still-forming bar, so signals do not repaint.
  • This indicator is a tool for study and education, not financial advice, and does not guarantee any trading outcome. Always apply your own analysis and risk management.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.