OPEN-SOURCE SCRIPT

Footprint Interpreter [TechnicalZen]

1 301
Footprint Interpreter [TechnicalZen]

⚠ Requires TradingView Premium or Ultimate subscription. This indicator uses request.footprint() which is not available on free or Essential plans.

What This Indicator Does

The Footprint Interpreter reads real order flow — actual buy-side and sell-side execution data from TradingView's footprint engine — and translates it into a visual language that reveals what the market is doing beneath the surface of price action.

You do not need the footprint chart open. You do not need to read bid/ask ladders, decode volume profiles, or interpret heat maps. The indicator extracts the essential signal from footprint data and presents it as candles, a Kalman-filtered trend ribbon, and a regime engine — all in a single pane.

The core question it answers: "Where is the real money flowing, and is it accelerating or decelerating?"

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Why Footprint Data Matters

Price tells you where the market went. Volume tells you how much participated. But neither tells you who was the aggressor.

Every trade has a buyer and a seller. Footprint data decomposes each bar's volume into buy-side executions (orders hitting the ask) and sell-side executions (orders hitting the bid). The difference — the delta — reveals which side was actively pursuing fills.

This matters because:

  • Absorption — Price goes sideways while one side relentlessly absorbs the other's aggression. Invisible on a price chart. Clearly visible in footprint delta.
  • Pre-breakout accumulation — Before a move begins, aggressive buying or selling often builds in the delta while price hasn't yet responded. The Footprint Interpreter catches this divergence.
  • Exhaustion — A strong price trend continues but the delta weakens. The aggressive side is running out of conviction. The indicator's regime engine detects this deceleration.
  • Confirmation — Price breaks a level and the delta confirms with expanding aggression in the same direction. Confidence in the move increases.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

How It Works

The indicator runs three engines simultaneously, each operating on raw footprint data — no price-derived inputs.

Engine 1 — Footprint Delta (FPD) Candles

The cumulative footprint delta is computed bar by bar: each bar's buy volume minus sell volume, accumulated over time. This running total is detrended by subtracting a slow moving average so the display oscillates around zero rather than growing indefinitely.

The result is plotted as candles. Green candles mean the FPD rose during that bar (net buying pushed the cumulative total higher). Red candles mean it fell. The candle body directly represents the flow direction and magnitude.

Engine 2 — Dual Kalman Ribbon

Two Kalman-filtered lines track the FPD at different speeds:

  • Short KF (default length 20) — responsive, tracks recent flow shifts
  • Long KF (default length 80) — stable, tracks the underlying flow trend


When the short KF is above the long KF, the ribbon fills bullish. When below, bearish. The ribbon's width indicates the strength of the directional conviction — a wide ribbon means the fast and slow flow assessments strongly agree.

Engine 3 — Volume-Native DX/ADX Regime

The regime engine is a faithful translation of the classic Directional Movement system into the volume domain. Every component has a proper analog:

  • Directional Movement — Instead of comparing today's high vs yesterday's high, it compares today's buy volume vs yesterday's buy volume. Is buying expanding? Is selling expanding? Only the winning side scores — the same competitive logic as the price-based original.
  • True Range — Instead of max(high-low, |high-close[1]|, |low-close[1]|), it uses max(totalVol, |buyVol-delta[1]|, |sellVol+delta[1]|). This captures both the bar's flow range and the gap from the previous bar's net settlement — detecting sudden flow reversals the way price TR detects overnight gaps.
  • DI+, DI-, DX, ADX — computed identically to the price version, but fed entirely by volume data.


The result is a four-state regime: Bull Strong, Bull Weak, Bear Strong, Bear Weak — telling you not just which side dominates but whether that dominance is accelerating or fading.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Why Kalman Filtering — Not Hull, EMA, or SMA

The Kalman filter is fundamentally different from traditional moving averages. A moving average is a fixed recipe: take N bars, weight them, output a number. It has no concept of whether the data it is processing is noisy or clean, fast-moving or stable.

The Kalman filter is an adaptive estimator. It maintains two quantities internally:

  • State estimate — its current best guess of the true value
  • Uncertainty estimate — how confident it is in that guess


On every bar, it computes a Kalman gain that automatically balances between trusting the new measurement and trusting its prediction. When the data is stable, the gain drops and the filter smooths heavily. When the data shifts, the gain rises and the filter responds quickly.

This matters for footprint data specifically because volume flow is inherently noisier and burstier than price. A single large institutional order can spike the delta for one bar and vanish the next. Hull or EMA will whipsaw on these spikes. The Kalman filter recognizes the spike as high-uncertainty data and dampens its response — unless the spike is sustained, in which case it adapts.

The two tunable parameters — R (measurement noise) and Q (process noise) — give precise control over this behavior without changing the filter's length or structure.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What It Reveals — Hidden Price Action

The most powerful use of this indicator is seeing what price alone cannot show:

Divergence Between Price and Flow
Price is rising but the FPD candles are falling or flat. This means the price advance is happening on declining aggressive buying — the move is running on fumes. The Kalman ribbon will begin to narrow and eventually flip before price confirms the reversal.

Pre-Breakout Energy
Price is consolidating in a tight range. The FPD candles begin trending directionally with expanding bodies. Aggressive flow is building on one side before the breakout occurs. The regime engine shifts from weak to strong. This gives the trader a heads-up — not a prediction, but evidence of building pressure.

Absorption Detection
Price pushes into a level and stalls. The FPD shows persistent negative delta despite bullish price action — sellers are absorbing every push. The Kalman short line begins diverging from the long line in the opposite direction of price. The regime stays weak or flips. The breakout attempt is likely to fail.

Trend Confirmation
Price breaks out and the FPD confirms: expanding candles in the same direction, both KF lines aligned and rising, regime at Bull Strong. This is the highest-confidence scenario — price and flow agree, and flow is accelerating.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Reading the Indicator

The Candles
  • Green body — FPD rose during this bar (net buying dominated)
  • Red body — FPD fell (net selling dominated)
  • Body size — magnitude of the net flow shift
  • Position relative to zero — above zero = cumulative flow above its recent average; below = below average


The Kalman Ribbon
  • Thin line (Short KF) — fast flow tracker, colored by slope
  • Thick line (Long KF) — slow flow trend, colored by direction
  • Ribbon fill — bullish when short above long, bearish when below
  • Ribbon width — wider = stronger conviction, narrower = indecision or transition


The Dashboard
  • Regime — four-state flow regime (Bull Strong / Bull Weak / Bear Strong / Bear Weak)
  • Kalman — current Kalman ribbon direction
  • FPD Position — whether FPD is above or below the fast Kalman line
  • Vol DX — signed directional strength from the volume DM engine
  • Bar Delta — this bar's net buy minus sell volume
  • Buy / Sell Vol — raw buy-side and sell-side execution volumes
  • Imbalance — ratio of dominant side to weak side
  • FPD — cumulative footprint delta total


When footprint data is unavailable (instrument or plan limitation), the dashboard title turns red with a warning indicator.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key Settings

DX/ADX Period (default: 25)
Smoothing length for the directional movement engine. Higher values produce more stable regime readings at the cost of responsiveness.

Detrend Period (default: 50)
Length of the SMA subtracted from FPD for display centering. Does not affect any calculations — purely visual. Higher values show longer-term flow trends. Lower values focus on recent action.

Short KF / Long KF Length (default: 20 / 80)
Controls the responsiveness of the two Kalman-filtered lines. Shorter = more reactive. Longer = more stable. The gap between them determines how quickly the ribbon responds to flow reversals.

Measurement Noise R (default: 0.01)
How much the Kalman filter trusts new data versus its own prediction. Higher = smoother. Lower = more reactive to each bar.

Process Noise Q (default: 0.10)
How quickly the Kalman filter allows its internal state to change. Higher = adapts faster to regime shifts. Lower = more rigid model.

Ticks Per Row (default: 1)
Resolution of the footprint histogram. 1 = maximum precision. Increase for very high-volatility instruments if you encounter data limits.

Value Area % (default: 70)
Percentage of total volume that defines the Value Area in the footprint data. Industry standard is 70%.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Requirements

  • TradingView Premium or Ultimate plan (required for request.footprint())
  • Instruments with footprint data available (most major futures, equities, and crypto pairs)
  • Pine Script v6


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What This Indicator Is Not

  • It is not a replacement for the footprint chart. It is a complementary interpretation layer. Traders who read raw footprint data will find additional context here. Traders who do not will gain access to footprint intelligence without needing to learn footprint chart reading.
  • It does not generate buy or sell signals. It provides directional regime information, flow momentum, and divergence detection. Trade decisions remain with the trader.
  • It does not predict price direction. It reveals the state of aggressive order flow and how that flow is evolving. What the market does with that information is never guaranteed.
  • It is not a volume indicator in the traditional sense. It does not use the standard volume series. It uses decomposed bid/ask execution data from TradingView's footprint engine — a fundamentally different and richer data source.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Disclaimer

This indicator is provided for educational and informational purposes only. It is not financial advice, and it does not constitute a recommendation to buy, sell, or hold any financial instrument.

All trading involves risk. Past performance of any signal, regime detection system, or flow analysis mechanism does not guarantee future results. The regime states, Kalman-filtered trend readings, and flow analysis displayed represent a computational assessment of order flow data available through TradingView's footprint engine. They are not predictions and should not be treated as certainties.

Footprint data availability and accuracy depend on the instrument, exchange, and TradingView's data feed. The indicator requires a Premium or Ultimate TradingView subscription. Data gaps, exchange outages, or instruments without footprint support will produce missing or incomplete readings. The dashboard provides a visual warning when footprint data is unavailable.

No indicator, algorithm, or model can account for all market variables including liquidity events, news-driven gaps, exchange outages, dark pool activity, or sudden regime changes. Order flow data represents only the visible portion of market activity — significant volume may execute through channels not captured by footprint data.

Traders should always use independent risk management, position sizing, and their own judgment before entering any trade.

By using this indicator, you acknowledge that you are solely responsible for your own trading decisions and that the authors accept no liability for any losses incurred.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.