OPEN-SOURCE SCRIPT
Execution Heatmap v4.1 — AI Enhanced

This indicator is an AI‑style execution dashboard that compresses structure, momentum, volume, volatility, and risk into a compact heatmap panel plus BUY/SELL signals on the chart. It is specifically tuned for gold and silver, automatically adapting its thresholds to the volatility profile of XAU/GC and XAG/SI symbols.
Core architecture
The system builds a multi‑factor model in layers:
Adaptive structure engine: Tracks dynamic higher‑high / lower‑low progression using rolling reference highs and lows, classifying price as structural UP, DOWN, or NEUTRAL.
Precision VWAP bias: Uses VWAP with a small threshold band to filter out noise and label price as ABOVE, BELOW, or neutral relative to value.
Impulse & angle: Combines short‑term rate of change and normalized slope (price vs ATR over 5 bars) to detect directional thrust, then clamps values into
[
−
1
,
1
]
[−1,1] for stable scoring.
Volume, wicks, and patterns
Adaptive volume tiers: Uses a 20‑bar volume average with gold/silver‑specific multipliers to tag candles as SURGE, HIGH, NORMAL, or LOW volume, with distinct coloring for extremes.
Wick analytics: Measures upper/lower wick size vs total range to detect demand/supply style rejections and encode them as bullish or bearish wick signals.
AI pattern score: Blends structure, VWAP, impulse, wicks, and angle into a normalized pattern score, then classifies it as STRONG↑, NEU↑, NEU, NEU↓, or STRONG↓ with color‑coded emphasis.
AI scoring and prediction layer
Predictive engine: Uses a neural‑network‑style weighted sum of structure, VWAP, impulse, wicks, angle, volume, and pattern to generate a prediction score in
[−1,1], then converts it into a percentage and arrow (↑, ↑↑, ↓, ↓↓, →) for intuitive directional bias.
Execution score: Aggregates key factors into an EXEC score (0–200+ style scale), color‑graded from weak (red) through medium (orange) to strong (green) execution context.
Uncertainty & risk: Separately models uncertainty (low impulse/angle or low conviction) and risk (fake breaks, VWAP position, uncertainty tier, low volume), then feeds them into a combined confidence calculation.
Final signal & confidence
Final classification:
BUY: High exec score, high confidence, and controlled risk.
SELL: Very low exec score, low confidence in upside, and acceptable risk.
WAIT: All other conditions where edge or clarity is insufficient.
Confidence bar: A textual mini‑bar (🟩 blocks) plus percentage shows how strong the current signal environment is, making it easy to visually gauge setup quality at a glance.
Professional heatmap panel
A two‑column table in the top‑right of the chart organizes the logic into layers:
Base layer: STRUCT, VWAP, IMPULSE, VOLUME.
AI layer: FAKE, REGIME (Trend/Pullback/Reverse/Chop), ANGLE.
Decision layer: PATTERN, PREDICT, EXEC, RISK, CONF, and FINAL direction.
Core architecture
The system builds a multi‑factor model in layers:
Adaptive structure engine: Tracks dynamic higher‑high / lower‑low progression using rolling reference highs and lows, classifying price as structural UP, DOWN, or NEUTRAL.
Precision VWAP bias: Uses VWAP with a small threshold band to filter out noise and label price as ABOVE, BELOW, or neutral relative to value.
Impulse & angle: Combines short‑term rate of change and normalized slope (price vs ATR over 5 bars) to detect directional thrust, then clamps values into
[
−
1
,
1
]
[−1,1] for stable scoring.
Volume, wicks, and patterns
Adaptive volume tiers: Uses a 20‑bar volume average with gold/silver‑specific multipliers to tag candles as SURGE, HIGH, NORMAL, or LOW volume, with distinct coloring for extremes.
Wick analytics: Measures upper/lower wick size vs total range to detect demand/supply style rejections and encode them as bullish or bearish wick signals.
AI pattern score: Blends structure, VWAP, impulse, wicks, and angle into a normalized pattern score, then classifies it as STRONG↑, NEU↑, NEU, NEU↓, or STRONG↓ with color‑coded emphasis.
AI scoring and prediction layer
Predictive engine: Uses a neural‑network‑style weighted sum of structure, VWAP, impulse, wicks, angle, volume, and pattern to generate a prediction score in
[−1,1], then converts it into a percentage and arrow (↑, ↑↑, ↓, ↓↓, →) for intuitive directional bias.
Execution score: Aggregates key factors into an EXEC score (0–200+ style scale), color‑graded from weak (red) through medium (orange) to strong (green) execution context.
Uncertainty & risk: Separately models uncertainty (low impulse/angle or low conviction) and risk (fake breaks, VWAP position, uncertainty tier, low volume), then feeds them into a combined confidence calculation.
Final signal & confidence
Final classification:
BUY: High exec score, high confidence, and controlled risk.
SELL: Very low exec score, low confidence in upside, and acceptable risk.
WAIT: All other conditions where edge or clarity is insufficient.
Confidence bar: A textual mini‑bar (🟩 blocks) plus percentage shows how strong the current signal environment is, making it easy to visually gauge setup quality at a glance.
Professional heatmap panel
A two‑column table in the top‑right of the chart organizes the logic into layers:
Base layer: STRUCT, VWAP, IMPULSE, VOLUME.
AI layer: FAKE, REGIME (Trend/Pullback/Reverse/Chop), ANGLE.
Decision layer: PATTERN, PREDICT, EXEC, RISK, CONF, and FINAL direction.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.