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.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。