OPEN-SOURCE SCRIPT

Footprint Delta Auction Map [BullByte]

18 640
Footprint Delta Auction Map [BullByte] is an Auction-Market-Theory analytical framework that measures directional pressure through a 3-Tier Delta Engine (TradingView native volume footprint, lower-timeframe intrabar reconstruction, and single-bar OHLCV proxy), qualifies it against candle conviction and multi-source level confluence (POC, VAH, VAL, session H/L, prior day H/L, weekly H/L, round numbers), classifies the current session as a Trend, Balance or Neutral Day using an Initial Balance regime detector, and only then marks a directional scenario on the chart with a fully sized reference-level map (Entry, Reaction, Extension, Invalidation).

It is designed for discretionary traders who want a single, transparent framework that brings order flow, price structure, key reference levels and session regime into one auditable qualification process.

---

1. WHAT THIS SCRIPT IS

On each confirmed bar with the required data available, the framework evaluates four complementary questions before a directional scenario can qualify:

Q1 - Is there directional pressure right now?
Measured through a 3-tier delta engine (see Section 4). Normalized to a bounded -100 to +100 Unified Auction Pressure reading.

Q2 - Is the candle itself convincing?
Measured through body-to-range ratio and range-to-ATR ratio. A high pressure reading on a doji inside a compressed range does not qualify.

Q3 - Is this happening at a location the market has already respected?
Measured through a weighted Confluence Ladder that scores proximity to POC, VAH, VAL, session high/low, prior day high/low, weekly high/low, and configurable round numbers.

Q4 - What is today's session character?
Measured through an Initial Balance (IB) day-type classifier (Trend / Balance / Neutral Day) that adjusts the qualification threshold and Extension sizing.

Only when all four align, a higher-timeframe EMA trend agrees, and the current session's IB is fully formed does the script mark a directional scenario and draw a full reference-level map on the chart.

---

2. WHAT PROBLEM IT SOLVES

The framework is designed to bring several normally separate forms of market context into one qualification process.

This script is built on the design premise that directional pressure, candle structure, location and session context each answer a different question about the same market event. Rather than treating any one measurement as a standalone trigger, the framework requires these conditions to agree before it marks a directional scenario. The intent is to provide more context around each signal and make the qualification process auditable, not to claim any specific rate of success.

Concretely, it helps with:

- Deliberate selectivity. A three-criterion gate (Pressure, Candle, Confluence) plus a composite score threshold plus HTF alignment plus IB regime plus cooldown means signals are intentionally infrequent and situational.
- Instrument-adaptive sizing. For sizing purposes, the script automatically derives an instrument-specific volatility band from the symbol's own historical ATR-as-percent-of-price distribution, reducing the need to manually retune the basic Sizing Unit for each market.
- Full transparency. A dashboard and a debug panel show which data tier is active, what the composite score is, which qualification criteria passed, what the session regime is, and where the current scenario stands.
- Session-aware context. An Initial Balance day-type verdict (Trend / Balance / Neutral) recalibrates how demanding the signal threshold is and how far Extension targets project.

---

3. HOW THE FRAMEWORK WORKS

Each layer answers a specific question from auction market theory, and the layers are structured in dependency order:

Delta / Auction Pressure - describes what the directional pressure reading says about the current auction. Sourced from TradingView's native volume footprint when available (Tier 3), from lower-timeframe intrabar reconstruction when not (Tier 2), or from a single-bar OHLCV pressure proxy as a universal fallback (Tier 1). Each tier is normalized independently to a common bounded -100 to +100 scale.

Candle Conviction - did the bar actually travel and close with intent. Prevents a strong pressure reading on a wick-heavy doji from qualifying.

Level Confluence - is this happening at a price the market has already marked as significant. Uses a triangular decay proximity kernel across POC, VAH/VAL, session H/L, prior day H/L, weekly H/L and round numbers, with pre-defined relative weights. When native footprint data is active, the true volume-profile references receive the highest weights; when footprint data is unavailable, their proxy weights are reduced so the ladder does not treat session-derived references as genuine volume-profile levels.

IB Regime Classifier - what kind of day is this. Compares today's Initial Balance range against a rolling historical median of prior sessions (today's IB is never included in its own median). Wider than median → Trend Day (raise threshold, widen Extension). Narrower than median → Balance Day (lower threshold, compress Extension). Otherwise Neutral.

HTF EMA Filter - does the larger timeframe agree with the direction. Uses confirmed previous higher-timeframe EMA slope only (non-repainting pattern with barmerge.lookahead_on on a [1] offset).

Each contributes information the others cannot. Removing any one of them changes what the signal means, not just how many signals fire. That dependency structure is what distinguishes this framework from an aggregation of unrelated indicators.

This is not a mashup of separate published indicators or unrelated indicator modules combined for convenience; it is a single framework in which each measurement was selected and integrated for a specific role in the qualification process.

---

4. THE THREE DATA TIERS

The three-tier architecture allows the script to use native footprint data when available and progressively simpler pressure estimates when it is not. The active tier is always shown on the dashboard so the user knows exactly what data is currently feeding the score.

Tier 3 - Native TradingView Footprint (requires Premium or Ultimate plan and footprint-supported symbol)
Uses request.footprint(). TradingView categorizes lower-timeframe volume via intrabar price action to produce buy volume, sell volume and delta. This is the only tier in this script that uses native footprint data. Not raw exchange bid/ask tick data.

Tier 2 - Intrabar Reconstruction (default, no special plan required)
Uses request.security_lower_tf() to decompose each bar into its lower-timeframe sub-bars, then applies the close-in-range volume heuristic to each sub-bar before summing. A lower-timeframe refinement of the single-bar OHLCV pressure estimate that can better distinguish intrabar two-sided movement than a single-OHLC read alone. This is an auction pressure estimate, not native footprint data.

Tier 1 - OHLCV Proxy (universal fallback)
Pine Script®

A single-bar pressure proxy. Used when native footprint data is not active and lower-timeframe reconstruction is unavailable, disabled, or returns no usable intrabar data. Coarsest estimate.

All three tiers are normalized onto a common bounded -100 to +100 scale before entering the composite score. Same scale does not mean identical statistical distribution: Tier 3 footprint delta and Tier 1 OHLCV pressure have different underlying measurement characteristics. The normalization ensures the score is internally self-consistent per tier.

---

5. COMPOSITE SCORE AND QUALIFICATION

When the required calculation data is available, the framework produces a Composite Score between 0 and 100:

Composite Score = Fingerprint Score × 0.60 + Ladder Score × 0.40

Fingerprint Score (60% weight) combines three sub-components on the current bar:

- Auction Pressure conviction - up to 40 points, based on absolute normalized pressure
- Candle body and range structure - up to 35 points (20 points body ratio, 15 points range-to-ATR ratio)
- Volume/pressure balance magnitude - up to 25 points, using the active tier's available pressure representation

Ladder Score (40% weight) provides location context. Each active reference level is scored using a triangular proximity kernel: score = 1 − (distance / tolerance) when distance is within tolerance; otherwise the score is zero. Levels are then weighted using predefined relative weights. When native footprint data is active, the genuine volume-profile references receive the highest weights; when footprint data is unavailable, those reference weights are reduced because the script uses session-derived proxies rather than true volume-profile levels.

The 60/40 weighting reflects the design choice to give greater influence to pressure, candle structure and volume/pressure balance than to location. Location confirms; pressure and structure trigger.

Signal qualification requires all of the following simultaneously:

- Composite Score at or above the effective threshold (default 58, adjusted ±5 by IB day-type)
- Auction Pressure absolute value at or above Criterion 1 minimum (default 35)
- Candle body ratio at or above Criterion 2 minimum (default 0.50)
- Number of level-confluence hits at or above Criterion 3 minimum (default 2)
- HTF EMA slope aligned with signal direction (if HTF filter is enabled)
- Current session's Initial Balance is fully formed and historical IB sample exists
- Current bar's direction (close vs open) aligns with pressure direction
- No active scenario, and cooldown not in effect

---

6. IB REGIME AND HTF CONTEXT

Initial Balance regime detector. The first N bars of each session define today's IB range. That range is compared to the rolling median of prior sessions' IB ranges (today is never included in its own median). If today's IB is 1.25x or wider than the historical median, the classifier labels the session Trend Day, raises the qualification threshold by 5 points, and sets the IB Extension scalar to 1.15x. If today's IB is 0.75x or narrower, it labels Balance Day, lowers the qualification threshold by 5 points, and sets the IB Extension scalar to 0.85x. Otherwise, the session is classified as Neutral Day. The final Extension multiplier is also affected by the volatility scalar and the minimum effective-multiplier floor described in Section 7. This is a heuristic regime signal, not a factual market classification.

The IB layer adjusts only the qualification threshold and the Extension multiplier. It does not change the 60/40 composite weights. Signals are also suppressed until the current session's IB has formed and at least three completed historical IB samples exist.

HTF EMA trend filter. The higher-timeframe EMA slope is evaluated on the confirmed previous HTF bar ([1] offset with barmerge.lookahead_on), which is the documented non-repainting pattern for confirmed HTF references. The HTF resolution is validated to be strictly higher than the chart timeframe before the request is made; if not, the script halts with an explicit error rather than silently misbehaving.

---

7. ENTRY / REACTION / EXTENSION / INVALIDATION

When a scenario qualifies, four reference levels are placed on the chart, all sized as multiples of a shared Sizing Unit (not raw ATR).

The Sizing Unit is a percentile-bounded percentage of price. Its min–max band is, by default, auto-derived from this instrument's own historical ATR-as-percent-of-price distribution (10th and 90th percentiles). This means the sizing base scales naturally with the instrument's own volatility character.

Then:
- Entry = signal bar close
- Reaction = Entry ± k1 × Sizing Unit (default k1 = 1.5)
- Extension = Entry ± effective k2 × Sizing Unit, where effective k2 is the larger of (k1 + 0.5) and (k2 base × IB scalar × volatility regime scalar) when Dynamic Extension Sizing is enabled. When dynamic sizing is disabled, the effective multiplier is the larger of (k1 + 0.5) and k2 base (default k2 base = 2.5)
- Invalidation = Entry ± k3 × Sizing Unit (default k3 = 1.5)

Extension scaling combines two factors:

- IB scalar: 1.15x on Trend Day, 0.85x on Balance Day, 1.00x on Neutral Day
- Volatility regime scalar: current ATR divided by baseline ATR, clamped between 0.8x and 1.6x so a single volatility spike cannot produce a runaway Extension

Same-bar resolution disclosure: When a single bar touches both Extension and Invalidation, OHLC data alone cannot establish which was reached first. The script uses a deterministic proximity convention (the level closer to the prior bar's close is assumed to have been reached first). This is a documented convention, not an observation of intrabar order.

---

8. DASHBOARD AND CHART INTERPRETATION

Directional badge on the signal bar

- Bullish-direction badge for LONG scenarios and Bearish-direction badge for SHORT scenarios; the default colors are green and red and are user-configurable.
- Header line: ▲ LONG or ▼ SHORT
- Second line: "FP Delta N" when Tier 3 is active, "Pressure N" when Tier 1 or Tier 2 is active. N is the absolute normalized Auction Pressure reading (0–100), not a percentage of volume.
- Third line: "near [level name]" - the highest-weighted level in proximity
- Fourth line: Session character (Trend Day / Balance Day / Neutral Day)

Four horizontal reference lines

- Entry (neutral color, adaptive to chart theme)
- Reaction (orange)
- Extension (purple)
- Invalidation (red)

Right-edge price tags - each of the four levels has a floating tag on the right edge of the chart showing its exact price. Tags are automatically separated vertically to reduce overlap among the four reference-level labels.

Reference level plots
- Prior Day High / Low (orange) - shown in the recent-bars segment
- Weekly High / Low (blue) - shown in the recent-bars segment
- IB High / Low (yellow, dashed)
- Session Reference (purple, dotted) - represents the footprint POC when Tier 3 is active and a session-derived reference when using Tier 1/2

Scenario lifecycle

- Pending - scenario is live; right-edge tags follow the current bar
- Reaction Zone Reached - an alert fires on the first qualifying post-signal touch of the Reaction level; Reaction does not end the scenario.
- Resolved-Extension - Extension reached first; scenario ends, right-edge tags removed, historical lines frozen
- Resolved-Invalidation - Invalidation reached first; same treatment

Main Dashboard (default: Top Right)

- Data Engine - Footprint (Tick), Intrabar (LTF Recon.), or Proxy (Single-Bar)
- Session Character - Trend Day, Balance Day, or Neutral Day
- Composite Score - current bar's score out of 100
- Score Requirement - effective threshold after IB adjustment
- Qualification Criteria - pass/fail status for Pressure, Candle, and Confluence
- Active Scenario - "None" if flat, or "Long/Short - Active (awaiting resolution)" if in progress
- Cooldown - visible only when active
- Reference Sizing (Inv : Ext) - the ratio currently applied

Debug Dashboard (default: Bottom Right, can be turned off)

- Fingerprint Score (60% wt.)
- Ladder Score (40% wt.) - score plus number of levels in proximity
- Nearest Level - the highest-weighted level currently in proximity
- Footprint Delta / Auction Pressure - the normalized -100 to +100 reading, labeled by active tier
- Extension Sizing Factor - the current volatility scalar and IB scalar
- Active Data Tier - full name of the tier plus (for Tier 2) number of intrabars in the current reconstruction

---

9. ILLUSTRATIVE SIGNAL WALKTHROUGH

The following description is illustrative and is included only to demonstrate how the scoring workflow is interpreted. It is not a historical performance result and does not represent past or future outcomes.

Consider a 15-minute chart of a liquid instrument during a session that has been classified as a Trend Day.

Setup context:

- Session Character: Trend Day (today's IB is wider than the historical median)
- Effective Score Requirement: raised by the IB adjustment
- HTF (1H) EMA slope: rising
- Data Engine: Intrabar (LTF Recon.) - user is on a plan without native footprint access

Bar N (signal bar):

- Bar closes with a strong upward body (body/range ratio comfortably above the 0.50 minimum)
- Intrabar reconstruction shows aggregated buy-side pressure over sell-side, producing a Unified Auction Pressure reading well above the Pressure minimum
- Price is trading close to the Prior Day High and near a Round Number, both within Level Tolerance
- Ladder Score registers multiple levels in proximity
- The Composite Score exceeds the effective Trend-Day threshold; Pressure, Candle and Confluence criteria all pass; HTF direction agrees; session is ready
- Signal qualifies. A bullish-direction LONG badge appears with text similar to:
- ▲ LONG
- Pressure (value)
- near Prior Day High
- Trend Day

Level map plotted from the Entry close:

- Entry = close of bar N
- Reaction = Entry + k1 × Sizing Unit (orange)
- Extension = Entry + effective k2 × Sizing Unit, scaled by Trend-Day and volatility factors (purple)
- Invalidation = Entry − k3 × Sizing Unit (red)
- Dashboard "Active Scenario" changes to: Long - Active (awaiting resolution)

Subsequent bars: As price advances into the Reaction Zone, an alert fires ("Reaction Zone reached"). The scenario stays active - Reaction is a first-touch alert, not a resolution. If price then reaches the Extension level, the scenario resolves as Resolved-Extension: right-edge tags are removed, the four reference lines freeze at the resolution bar, the "Active Scenario" cell returns to "None", and a cooldown period begins during which no new signals can fire. If instead price reached the Invalidation level first, the scenario would resolve as Resolved-Invalidation with the same freeze and cooldown behavior. In the rare case where a single bar touches both Extension and Invalidation, the proximity-based tie-breaking convention (Section 7) determines the resolved outcome.

Note on FVGs and Order Blocks: This script does not natively detect Fair Value Gaps or Order Blocks. Traders who use dedicated FVG/OB analysis can treat those structures as external chart context and compare them with the reference-level map produced by this script. For example, a trader may observe a signal near a Prior Day Low or VAL while independently identifying a bullish Order Block or FVG at the same area. The FVG/OB structure is not generated or validated by this script.

Real Chart Example with explanation

Example 1: A short scenario was marked on Gold when Tier‑2 intrabar-reconstructed Auction Pressure hit 98 on a bearish, high-conviction candle sitting inside confluence tolerance of the Prior Day Low pushing the Composite Score above the 58 threshold under a Neutral Day regime. Footprint (Tier 3) was OFF for this example, so the pressure reading came from OHLCV-based intrabar reconstruction, not native footprint delta. Entry locked at that bar's close (4,363.94); price stalled near PDL for ~30 minutes, then broke down through the Reaction level (4,357.72) and into the Extension zone (4,355.12), with the current bar's intrabar low (4,352.76) already trading beyond Extension, though the scenario still shows "Active" since resolution only confirms on bar close.

snapshot

Example 2: A long scenario was marked on QQQ when native Footprint (Tier 3) delta hit +66 on a bullish candle confluent with POC, under a Balance Day regime that lowered the qualification threshold by 5 (58 → 53) because today's Initial Balance was narrower than the historical median. Entry locked at 729.35; price consolidated near Entry for roughly an hour, then broke out through Reaction (730.25) toward Extension (730.55), with the Balance Day IB scalar (0.85x) compressing the Extension distance compared to a Trend Day setup. Unlike the earlier Gold example, this signal used genuine tick-based footprint data rather than OHLCV reconstruction.


snapshot

---

10. SETTINGS

Recommended usage:

Designed primarily for intraday analysis on 5m, 15m, 30m and 1H charts, with the exact usefulness depending on the instrument's session structure and liquidity. Works on liquid crypto pairs, index futures and CFDs, liquid FX pairs, and large-cap equities during regular session hours.

Timeframe defaults:

- On 5m–15m charts: default HTF = 60 (1H), Intrabar Reconstruction = 1m
- On 30m–1H charts: consider raising HTF to 240 (4H)
- On 1m charts: leaving Intrabar Reconstruction at the default "1" causes the lower-timeframe request to fall back to Tier 1 because the requested resolution is not lower than the chart timeframe.
- Do not set Intrabar Reconstruction to a seconds-based resolution on 5m or higher charts - this can exceed TradingView's intrabar request cap

Not recommended for very illiquid instruments, daily or higher timeframes (IB is intraday by design), or symbols with no volume data.

Settings you may want to change frequently:

- Composite Score Requirement (default 58) - raise for more selective signals, lower for more frequent
- HTF Resolution (default 60) - align with your own top-down analysis
- Cooldown Period (default 20 bars) - longer for swing style, shorter for scalping

Settings you may want to tune per market:

- Round Number Step - choose a positive price interval appropriate to the instrument
- IB Window (bars from session open) - on a 15-minute chart, the default 6-bar IB window represents 90 minutes; adjust to match the session structure you want to analyze

These settings are intended as general-purpose defaults and usually do not need frequent adjustment:

- All ATR-related inputs (Length, Outlier Filter, Floor)
- Pressure Normalization Lookback
- Sizing Regime Lookback
- Auto Sizing Band Lookback
- Level Tolerance % - controls how close price must be to a reference level for that level to contribute to confluence; the default is 1.2%; users may adjust it to suit the instrument and timeframe

Advanced toggles:

- Enable Footprint Engine (Tier 3) - leave OFF unless you have Premium/Ultimate and your symbol supports footprint data
- Enable Intrabar Reconstruction (Tier 2) - leave ON by default; with the default 1-minute resolution it falls back to Tier 1 on a 1-minute chart because the requested timeframe is not lower than the chart timeframe
- Use Dynamic Extension Sizing - leave ON for auto-scaled Extension by IB and volatility regime
- Auto-Derive Sizing Band - leave ON to get instrument-appropriate SL/TP sizing automatically
- Require Next-Bar Confirmation - turn ON for fewer, more selective signals at the cost of one bar of lag

---

11. ALERTS

Five alert conditions are available in the TradingView alert dialog:

- FDAM - Long Scenario Marked
- FDAM - Short Scenario Marked
- FDAM - Reaction Zone Reached
- FDAM - Extension Zone Reached
- FDAM - Invalidation Level Reached

The script also uses alert() calls for dynamic messages. Those programmatic alerts are issued once per confirmed bar close. The alertcondition() entries are selectable in the TradingView alert dialog; the script raises those conditions only on confirmed bars, while the selected alert frequency is configured in TradingView.

The dynamic alert() messages for Long and Short scenarios include the direction, active-tier pressure reading, nearest qualifying level, and session character (for example: "▲ LONG - Pressure 64 near Prior Day High (Trend Day)").

---

12. LIMITATIONS

- This is a discretionary analytical indicator rather than a built-in strategy backtest. It does not calculate audited P&L, win rate or historical strategy performance.
- The 3-tier delta engine is not equally precise across tiers. Tier 3 uses native TradingView footprint data. Tier 2 uses lower-timeframe OHLCV reconstruction. Tier 1 uses a single-bar OHLCV proxy. Each is normalized to the same -100 to +100 scale, but same scale does not mean same statistical distribution. The dashboard always shows which tier is active.
- The IB day-type classifier is a heuristic, not a factual market classification. "Session" is defined by whatever session context the chart symbol reports via session.isfirstbar - this varies across equities, futures, crypto and FX. The classifier labels a session based on IB-to-historical-median ratio thresholds; it does not identify participant intent.
- The confluence ladder weights are pre-defined analytical weights, not statistically derived reliability scores. They reflect the relative significance of level types in auction market theory as designed by the author.
- Same-bar Extension/Invalidation resolution uses a deterministic proximity convention based on distance from the prior bar's close. OHLC data alone cannot establish actual intrabar sequence. This is disclosed on-chart via the resolution status and in this description.
- Signals are intentionally suppressed until the current IB is formed and at least three completed historical IB samples are available.
- Footprint mode (Tier 3) may behave inconsistently during Bar Replay because of TradingView's footprint data caching. The script displays an on-chart notice when Footprint mode is enabled and recommends disabling it for replay testing.

---

13. DISCLAIMER

This script is a technical analysis tool built for educational and informational purposes only. It does not constitute financial advice, investment advice, trading advice, or a recommendation to buy or sell any security or instrument. Nothing produced by this script - signals, scores, zones, or labels - should be interpreted as a guarantee of future price behavior. Markets are probabilistic, not deterministic; past patterns in auction structure, delta, or volatility regime do not guarantee repeat outcomes. Trading leveraged instruments (crypto, futures, indices) carries substantial risk of loss. You are solely responsible for your own trading decisions, position sizing, and risk management. The author assumes no liability for losses incurred through the use of this script.

Users on plans that do not support volume-footprint data should leave the Footprint Engine toggle OFF. With Footprint mode disabled, the script uses Tier 2 when a usable lower-timeframe reconstruction is available and Tier 1 otherwise.

Published as open-source under the Mozilla Public License 2.0.

- BullByte

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.