Heatmap Block Box

The indicator tracks where market swing transitions have occurred and highlights those ranges as potential areas where price previously showed notable reactions.
This tool does not generate buy or sell signals,
and it does not attempt to forecast or guarantee any future price movement.
All visual elements are designed solely to support structural interpretation.
■ Calculation Logic
The indicator supports three Logic Modes to detect structural changes in different ways:
1) Default Mode — Pivot-Based Swing Detection
Uses TradingView’s built-in pivot logic
Identifies swing highs/lows based on left/right bar count
2) Adaptive Mode — ATR-Based Volatility Structure
Detects swings when recent price movement exceeds ATR × Multiplier
Automatically adapts to volatility conditions
3) Hybrid Mode — Combined Structure Detection
Integrates both Pivot and Adaptive logic
Captures a wider range of structural swing points
■ Block Box Generation Rules
Bearish Block
A red bearish box is drawn when all of the following conditions are met:
A recent swing high exists
The current bar’s high/close is below the previous swing high
Close < Open
Close finishes below the recentLow
→ A red box is drawn from the recent swing High to Low range
Bullish Block
A green bullish box is drawn when all of the following conditions are met:
A recent swing low exists
The current bar’s low/close is above the previous swing low
Close > Open
Close finishes above the recentHigh
→ A green box is drawn from the recent swing Low to High range
■ Visual Elements
Block Zones
Bearish Block → user-defined red color
Bullish Block → user-defined green color
Adjustable opacity for clearer chart integration
Signal Labels (Optional)
Displays a label at the moment a block forms
Labels represent structural events only, not trading signals
■ Input Parameters (Clear & Technical)
Logic Mode
Choose swing detection method: Default / Adaptive / Hybrid
Left Bar Count / Right Bar Count
Number of bars examined on each side for pivot-based swing detection
Show Signal Labels
Enable/disable structural event labels
Bearish Box Color / Bullish Box Color
User-defined colors for each block type
Box Opacity
Controls transparency of the block background
Adaptive ATR Multiplier
Used in Adaptive and Hybrid modes
A swing is identified when price movement exceeds ATR × Multiplier
■ Repaint Behavior
Pivot-based swing highs/lows are tentative on the currently forming bar
and may update until the bar is fully confirmed.
This is normal behavior for pivot logic and not a form of repainting that uses future data.
Adaptive mode does not repaint
Hybrid mode inherits the characteristics of both pivot and adaptive logic
The indicator does not use future data,
and confirmed blocks in the past do not change once finalized.
■ Purpose of the Indicator
Heatmap Block Box is intended as a market structure visualization tool,
helping users observe areas where swing-based structural shifts previously occurred.
It assists with:
Identifying key price ranges influenced by structural shifts
Highlighting concentration zones where price showed prior reactions
Supporting structural interpretation through clear visual elements
■ Indicator Limitations
The tool does not perform the following:
It does not predict future price movements.
It does not provide buy or sell timing.
It does not guarantee any trading results.
■ Notes & Limitations
Swing structure can vary depending on volatility and bar progression
The indicator should not be used as a standalone decision tool
It is recommended to combine it with other forms of analysis
Labels indicate structural events only, not actionable signals
نص برمجي للمستخدمين المدعوين فقط
يمكن فقط للمستخدمين الذين تمت الموافقة عليهم من قبل المؤلف الوصول إلى هذا البرنامج النصي. ستحتاج إلى طلب الإذن والحصول عليه لاستخدامه. يتم منح هذا عادةً بعد الدفع. لمزيد من التفاصيل، اتبع تعليمات المؤلف أدناه أو اتصل ب c9indicator مباشرة.
لا توصي TradingView بالدفع مقابل برنامج نصي أو استخدامه إلا إذا كنت تثق تمامًا في مؤلفه وتفهم كيفية عمله. يمكنك أيضًا العثور على بدائل مجانية ومفتوحة المصدر في نصوص مجتمعنا.
تعليمات المؤلف
إخلاء المسؤولية
نص برمجي للمستخدمين المدعوين فقط
يمكن فقط للمستخدمين الذين تمت الموافقة عليهم من قبل المؤلف الوصول إلى هذا البرنامج النصي. ستحتاج إلى طلب الإذن والحصول عليه لاستخدامه. يتم منح هذا عادةً بعد الدفع. لمزيد من التفاصيل، اتبع تعليمات المؤلف أدناه أو اتصل ب c9indicator مباشرة.
لا توصي TradingView بالدفع مقابل برنامج نصي أو استخدامه إلا إذا كنت تثق تمامًا في مؤلفه وتفهم كيفية عمله. يمكنك أيضًا العثور على بدائل مجانية ومفتوحة المصدر في نصوص مجتمعنا.