OPEN-SOURCE SCRIPT

Footprint Delta Profile [SDT]

1 392
A session volume profile built from TradingView's native footprint data. Every row is split into aggressive buys at the ask and sells at the bid, with a point of control and a value area.

Most delta profiles on the platform infer the side from candle direction: if a bar closes up, its whole volume counts as buying. That is an approximation, and it breaks exactly where it matters, on bars that reverse. This script takes the side from request.footprint(), where the aggressor is known per price row, so the split is measured rather than guessed.

HOW THE PROFILE IS BUILT

request.footprint() returns the volume rows of one bar at a time. Each confirmed bar is folded into a composite: every footprint row is assigned to a price bucket by its midpoint, and the bucket accumulates volume and delta. Buckets stay sorted, so the profile remains ordered as the window fills.

Aggressive volume per bucket is derived from bucket volume V and bucket delta D as sell = (V - D) / 2 and buy = (V + D) / 2. This is exact by the definition of delta.

The point of control is the heaviest bucket. The value area grows outward from it, repeatedly taking the heavier of the two neighbouring buckets until the requested share of total volume is enclosed.

The window resets on a period that is strictly larger than the chart timeframe. Auto uses the day on intraday charts, the month on daily charts, and no reset on weekly and above. A period that is not larger than the chart timeframe would reset on every bar, so it falls back to a bar count instead.

THREE INDEPENDENT DISPLAY SETTINGS

Data mode decides what the row length measures. Volume is the total traded at that price, coloured by delta sign. Delta is the size of the imbalance itself. Bid x Ask measures aggressive sells and buys separately.

Layout decides how the row is laid out. One-sided grows right from the axis. Two-sided sends one part left and the other right. The two combine freely: delta two-sided gives a multidirectional imbalance histogram, bid x ask two-sided gives the classic two-column profile, volume two-sided gives a symmetric butterfly.

Style decides how the row is drawn: filled blocks, a volume gradient, a single filled outline drawn as one polyline, or thin ticks.

A note on what to expect: under a shared wing scale, bid x ask looks nearly symmetric. That is a property of the data, not a drawing fault. Aggressive buying and selling at a given price are usually within a few percent of each other, so both wings are close to half the row volume. Switch the wing scale to independent to see the shape difference, or use the delta mode, where only the dominant side is drawn.

ROW RESOLUTION

ticks_per_row is declared as a simple int, so it cannot be computed from the bar range or the ATR at runtime. Auto scales it by chart timeframe, which keeps the row count sane but cannot account for the difference between instruments: four ticks is about one point on Nasdaq futures and a quarter of a five-minute range on Euro futures.

The script therefore measures the average bar range over the last fifty bars and shows, in the table, the tick count that would give the requested number of rows per bar on the current symbol. Set the input to that number. Where even the finest resolution cannot reach the target, as on Euro futures intraday, the readout says so instead of flagging an error.

The profile bucket height is a separate matter and is chosen automatically. On the first bar with data the script takes the footprint row height and an ATR-based estimate of the window range, then rounds the bucket up to the smallest multiple of the row height that keeps the profile under the row limit. Nothing to tune by hand, and the drawing limit cannot be exceeded.

ABSORPTION MARKERS

A circle appears when one third of a bar's range holds at least the configured share of that bar's volume while the delta in that third points against the direction of the bar. Aggression that meets size and fails to move price is the signature of a passive participant taking the other side. The circle sits below the bar when sellers were absorbed on an up bar, above it when buyers were absorbed on a down bar.

TABLE

Rows per bar shows the measured average, the tick setting in use, and the suggestion when it differs. Window shows the active reset period. Then the point of control, the value area bounds, the cumulative delta of the window and its total volume, and the number of profile rows currently held.

THEME

The palette follows the chart. Auto reads the background through chart.bg_color, computes its relative luminance and switches between a dark and a light variant of the chosen palette; text colour comes from chart.fg_color. Five palettes are included, plus a custom option.

NOTES AND LIMITS

Footprint data requires a TradingView plan that includes it, and is not available on every symbol. Without it the script draws nothing rather than substituting an estimate.

The forming bar is added to the profile only when it closes, so the profile lags the live bar by one bar. This keeps the composite free of double counting during real-time updates.

This is an observation tool. It produces no entries, exits or directional calls.

Built on FootprintKit, an open-source Pine library by the same author, which performs the row statistics and the composite profile. This script requests the footprint, feeds the profile and draws it.

FootprintKit

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.