Skip to main content

Footprint Chart

What is a footprint chart?​

A footprint chart (also called an order flow chart) is a price chart that opens up each candle to show the volume traded at every price inside it. Each row splits that volume into trades at the bid (sellers crossing the spread) and at the ask (buyers crossing it), so you can see where and how the bar was built.

A dark navy footprint chart of six five-minute bars: each bar is a column of price rows with sell volume in red on the left and buy volume in green on the right, the busiest row outlined in yellow, bright green and red cells marking imbalances, and a pane underneath with green and red delta columns and a cumulative delta line

A footprint chart of six five-minute bars, with bid × ask volume at each price, the point of control outlined and a delta pane underneath (simulated trades). Try the interactive version.

Key takeaways
  • A footprint bar is a candle broken into price rows, with the volume sold at the bid on the left and bought at the ask on the right.
  • Delta is ask volume minus bid volume: per row, per bar and, added up over time, as cumulative delta.
  • The point of control is the busiest price in a bar; the value area is the band around it that holds about 70% of the bar's volume.
  • Imbalances compare the ask at one price with the bid one row lower: diagonally, because those are the two sides of one quote.
  • You need trade-by-trade data that records which side started each trade. Bars of open, high, low and close aren't enough.

What a footprint chart shows​

A footprint chart shows volume by aggressor side at each price: how much traded at the bid and how much at the ask, row by row inside every bar.

Every trade has two sides, so total buying always equals total selling. What differs is who started the trade. A trader who sends a market order to buy pays the ask, the lowest price anyone is offering to sell at. A trader who sells at market accepts the bid, the highest price anyone is offering to pay. The side that crosses the spread is called the aggressor; the side whose order was already waiting in the order book is passive.

A footprint chart counts volume by aggressor:

  • Bid volume (often drawn on the left, in red): contracts or shares traded at the bid, started by sellers.
  • Ask volume (on the right, in green): contracts or shares traded at the ask, started by buyers.

It counts them separately for every price row in every bar. A row is usually one tick, the smallest price step the market allows (0.25 index points on some stock index futures, for example), or a few ticks merged together. A five-minute bar that traded across 12 ticks becomes a column of 12 rows with two numbers each, instead of a single candle.

Where a candlestick answers "where did the price go?", a footprint answers "at which prices did the trading happen, and which side was pushing?". The chart describes what traded; it says nothing certain about what happens next. This page explains how footprint charts are built and read, and is not investment advice.

How to read a footprint chart​

Read a footprint bar row by row: each price shows bid volume on the left and ask volume on the right, with the busiest row and any imbalances marked.

Anatomy of one footprint bar: five price rows from 5,001.00 to 5,002.00 with bid volume on the left and ask volume on the right, the busiest row outlined as the point of control, a value area bracket, an arrow comparing 150 at the ask with 40 at the bid one row lower as a 375% ask imbalance, a thin candle beside the rows and a delta row underneath

  1. Check the bar length and row size. The bar might cover one minute, five minutes or a fixed number of trades; each row might be one tick or several. Both change the numbers.
  2. Find the bar's open, high, low and close. Most footprints draw a thin candle beside or through the rows, or colour the rows' outline.
  3. Read a row from left to right. "64 × 150" at 5,001.75 means 64 contracts were sold at the bid and 150 bought at the ask at that price during the bar.
  4. Find the point of control (POC), the row with the most total volume, usually outlined or shaded. It shows where the bar did most of its business.
  5. Read the delta under the bar: ask volume minus bid volume for the whole bar. Compare its sign with the candle's colour.
  6. Look for highlighted cells. Most charts colour a cell when one side traded several times as much as the other, measured diagonally (see Diagonal and stacked imbalances).
  7. Look at where volume thins out. A row at the very top or bottom of a bar with almost no volume on one side shows where trading stopped.

A worked example: one footprint bar​

Here is the bar from the diagram, five rows one tick (0.25) tall. The bar opened at 5,001.25, traded between 5,001.00 and 5,002.00, and closed at 5,001.75.

PriceBid (sold)Ask (bought)TotalDelta (ask − bid)
5,002.0062228+16
5,001.7564150214+86
5,001.5040118158+78
5,001.2513145176−86
5,001.008814102−74
Bar329349678+20

What the numbers say:

  • Volume: 678 contracts in total.
  • Delta: 349 − 329 = +20. Buyers and sellers who crossed the spread traded almost the same amount over the bar.
  • Point of control: 5,001.75, with 214 contracts.
  • Value area: start at the POC (214), add the busier neighbour, 5,001.50 (158), then the busier neighbour again, 5,001.25 (176). The three rows hold 548 of 678 contracts (81%), past the 70% mark, so the value area runs from 5,001.25 to 5,001.75.
  • Imbalances at 300%: 150 at the ask at 5,001.75 against 40 at the bid at 5,001.50 is 375%, an ask imbalance. No other pair reaches 300%.

The lower two rows were dominated by selling (delta −86 and −74), the upper three by buying, and the busiest trading happened near the top. The candle and the bar delta of +20 show none of that split: on their own they look like an ordinary small rise.

How the row size changes the picture​

Merge the same trades into rows two ticks (0.50) tall and the bar has three rows: 5,001.00–5,001.25 with 219 × 59, 5,001.50–5,001.75 with 104 × 268, and 5,002.00 with 6 × 22. The ask imbalance disappears: 268 at the ask against 219 at the bid one row lower is only 122%. A bid imbalance appears instead: 104 at the bid against 22 at the ask one row up is 473%. Bigger rows make the chart easier to read on screen and smooth out single-tick spikes, but they also hide detail. Try the Row size control in the demo below to see it happen.

Types of footprint chart​

The same bid and ask counts can be drawn in several ways. Most tools let you switch between them.

LayoutWhat each row showsGood for
Bid × askTwo numbers, bid volume and ask volume, often on coloured cellsSeeing both sides and finding imbalances
Volume (total)One number: bid + askSeeing where the bar traded, without the split
DeltaOne number: ask − bid, coloured green or redSeeing at a glance which prices buyers or sellers drove
Volume profile per barA horizontal bar per row, its length set by volume, often split into bid and ask coloursSeeing the shape of each bar's volume, even zoomed out
Imbalance highlightingAny of the above, with cells coloured when one side outweighs the other diagonallySpotting one-sided trading quickly

Most footprints also add a summary row under each bar (volume, delta, sometimes the lowest and highest delta reached during the bar) and a candle or outline to show the open, high, low and close.

Delta and cumulative delta​

Delta is ask volume minus bid volume. It can be read at three scales:

  • Per row: which side was more aggressive at that price.
  • Per bar: the total for the bar, usually printed underneath it or drawn as a column in a pane below.
  • Cumulative delta: the bar deltas added up from the start of a session, drawn as a line. It shows whether aggressive buying or selling has dominated over a longer stretch.

Delta measures which side was aggressive. It isn't a measure of money flowing in or out, because every contract bought at the ask was sold by someone whose order was waiting at that price. A positive delta can come with a falling price, for example when passive sellers with large resting orders absorb the buying. Comparing delta with what the price did is the main way delta is used, which is why the demo draws bar delta and cumulative delta in a pane aligned with the bars.

Point of control and value area​

These two ideas come from market profile analysis, which studies how volume (or time) is spread across prices.

  • Point of control (POC): the price row with the most volume in the bar. When two rows tie, tools differ on which one they mark.
  • Value area: the range of rows around the POC that holds a set share of the bar's volume, usually 70%. The 70% figure comes from market profile practice, where it was chosen as roughly one standard deviation of a normal distribution.

A common way to build the value area is to start at the POC and keep adding the busier neighbouring row (above or below) until the share is reached, as in the worked example. Some tools compare two rows at a time instead, or use 68% or 80%, so the edges can differ by a row or two between tools.

On a session-wide volume profile the POC and value area describe the whole day. On a footprint they are per bar, so you can follow how the busiest price moved from bar to bar.

Diagonal and stacked imbalances​

An imbalance is a row where one side traded several times as much as the other. The threshold is a setting, typically 150% to 400%; 300% is a common default.

The comparison is made diagonally, not across the row. At any moment the ask is one tick above the bid. A buyer who lifts the ask at 5,001.75 is trading against the same quote as a seller who hits the bid at 5,001.50. So the fair comparison for ask volume at one price is bid volume one row lower:

  • Ask imbalance at price P: ask volume at P ≥ threshold × bid volume at P − 1 row.
  • Bid imbalance at price P: bid volume at P ≥ threshold × ask volume at P + 1 row.

Two practical details change what gets highlighted. Most tools ignore rows with very small volumes (a 3 against a 1 is 300% but means little), and they handle the top and bottom rows differently because one side of the comparison is missing. The demo ignores cells under 10 contracts, and never compares the ask in the bottom row or the bid in the top row, because the other side of the quote is outside the bar.

A stacked imbalance is three or more imbalances on the same side in consecutive rows. It marks a stretch of prices where one side kept crossing the spread while the price moved through several ticks. Traders often note these price zones and watch how the price behaves when it returns to them. That describes how the chart is used; it is not evidence that the zones hold or that the price will react there.

The data a footprint chart needs​

A footprint can't be built from candles. It needs every trade, or at least volume per price per bar, with the aggressor side:

  • Price, size and time of each trade.
  • Aggressor side: buy or sell. Some exchange feeds publish it with each trade. CME Group's market data, for example, carries an aggressor side field on its trade summary messages.
  • Where the side isn't published, it has to be inferred, usually by comparing the trade price with the bid and ask quoted just before it. The Lee and Ready algorithm is the classic method; any inference misclassifies some trades.

Volumes add up fast. A liquid market can print many thousands of trades an hour, so a day of footprints for one market is typically aggregated on a server into a compact grid (bar, price row, bid volume, ask volume) and sent to the browser in a binary or columnar format. See time series data formats for how to keep that small. Cryptocurrency exchanges' public trade feeds usually say which side was the taker, which plays the same role as the aggressor side, but check each feed's documentation before computing delta: in Coinbase Exchange's feed the side field is the maker's side, so the taker is on the opposite side.

Footprint chart vs candlestick chart vs volume profile​

Use a candlestick for each bar's price range, a volume profile for where a whole session traded, and a footprint for volume and aggressor side inside each bar.

If the reader needs to…Use
See open, high, low and close for each period, and the overall trendCandlestick chart or OHLC chart
See at which prices a whole session or range traded mostVolume profile: one horizontal histogram for the range
See volume at each price inside each bar, and which side was aggressiveFootprint chart
See resting orders waiting in the book, not tradesA market depth (order book) chart or an order book heatmap
See how volume is distributed in general, outside of tradingA histogram

A footprint is a candlestick with the volume profile moved inside each bar. It is dense, so it works best zoomed in to a handful of bars; zoomed out, it falls back to candles, as the demo does.

Common footprint chart mistakes​

Most footprint chart mistakes come from reading more into bid and ask volume than it holds, or from comparing charts built with different data or settings.

  • Reading bid and ask as buyers and sellers in total. Every trade has a buyer and a seller. Bid and ask volume tell you who crossed the spread, not who "won".
  • Mixing data sources. Feeds for the same market can split or bundle trades differently, and only some publish the aggressor side, so footprints built from different feeds don't match row for row.
  • Ignoring the row size and bar length. Change either and the volumes, imbalances and POC change too. Two footprints are only comparable with the same settings.
  • Trusting inferred aggressor sides blindly. If your feed doesn't publish the side, some trades will be classified wrongly, especially in fast markets.
  • Treating tiny volumes as signals. A 300% imbalance on 4 contracts against 1 is noise. Set a minimum volume.
  • Too many bars on screen. With dozens of bars, the numbers become unreadable. Zoom in, use a larger row size, or switch to the volume profile or delta layout.

How to create a footprint chart in JavaScript, React or Angular​

The demo below simulates about 28,000 trades in your browser, aggregates them into 40 five-minute bars, and redraws the cells, numbers and candles as you zoom. It follows the approach of SciChart's footprint chart example (CandlestickToFootprintZoom on GitHub): one chart of candles that turns into a footprint when the bars are wide enough.

Scroll to zoom and drag to pan; the bars switch between candles and footprints by width, and the numbers appear when there's room. Zoom out to candles and Zoom in to footprint jump between the two views, and double-click resets. Display switches between bid × ask, a volume profile per bar and delta per row. Imbalance sets the diagonal threshold (or turns it off), and stacked imbalances appear as bars beside the rows. Row size merges ticks into larger rows. Value area (70%) shades each bar's value area; the yellow outline is the point of control.

Here is the code for this chart. The order flow maths (rows, delta, POC, value area and imbalances) is plain JavaScript; SciChart.js draws the cells as rectangles, the volumes as text and the candles as a candlestick series.

// A candlestick chart that turns into a footprint (bid/ask volume at each price) when you zoom in, with SciChart.js
const {
SciChartSurface,
SciChartVerticalGroup,
NumericAxis,
NumberRange,
EAxisAlignment,
EAutoRange,
EXyDirection,
OhlcDataSeries,
FastCandlestickRenderableSeries,
XyxyDataSeries,
FastRectangleRenderableSeries,
EColumnMode,
EColumnYMode,
XyTextDataSeries,
FastTextRenderableSeries,
EHorizontalTextPosition,
EVerticalTextPosition,
XyDataSeries,
FastColumnRenderableSeries,
FastLineRenderableSeries,
EFillPaletteMode,
EStrokePaletteMode,
SciChartJsNavyTheme,
CursorModifier,
MouseWheelZoomModifier,
ZoomPanModifier,
ZoomExtentsModifier
} = SciChart;
// or, for npm, import { SciChartSurface, ... } from "scichart"

// --- Order flow maths (plain JavaScript, no library needed) ---

// One bar: OHLC from the trades, plus buy (at the ask) and sell (at the bid) volume at every price row.
// Rows are rowTicks ticks tall; row r covers the prices from r * rowTicks to r * rowTicks + rowTicks - 1 ticks.
function buildFootprint(barTrades, rowTicks) {
const first = barTrades[0].tick;
let high = first;
let low = first;
for (const t of barTrades) {
high = Math.max(high, t.tick);
low = Math.min(low, t.tick);
}
const lowRow = Math.floor(low / rowTicks);
const rowCount = Math.floor(high / rowTicks) - lowRow + 1;
const buy = new Array(rowCount).fill(0);
const sell = new Array(rowCount).fill(0);
for (const t of barTrades) {
const r = Math.floor(t.tick / rowTicks) - lowRow;
if (t.isBuy) buy[r] += t.size;
else sell[r] += t.size;
}
return {
open: first * TICK,
high: high * TICK,
low: low * TICK,
close: barTrades[barTrades.length - 1].tick * TICK,
lowRow,
buy,
sell
};
}

// Point of control (the busiest row) and the value area: start at the POC and keep adding the busier
// neighbouring row until the rows hold 70% of the bar's volume
function valueArea(fp, share = 0.7) {
const total = fp.buy.map((b, r) => b + fp.sell[r]);
const volume = total.reduce((sum, v) => sum + v, 0);
let poc = 0;
for (let r = 1; r < total.length; r++) if (total[r] > total[poc]) poc = r;
let lo = poc;
let hi = poc;
let inside = total[poc];
while (inside < share * volume) {
const below = lo > 0 ? total[lo - 1] : -1;
const above = hi < total.length - 1 ? total[hi + 1] : -1;
if (above >= below) inside += total[++hi];
else inside += total[--lo];
}
return { poc, lo, hi, volume, delta: fp.buy.reduce((s, v) => s + v, 0) - fp.sell.reduce((s, v) => s + v, 0) };
}

// Diagonal imbalances: buying at the ask in row r against selling at the bid one row lower (r - 1), which are
// the two sides of the same quote. Rows with fewer than minVolume contracts are ignored. ratio 3 means 300%.
function imbalances(fp, ratio, minVolume = 10) {
const n = fp.buy.length;
const askImbalance = new Array(n).fill(false);
const bidImbalance = new Array(n).fill(false);
if (ratio > 0) {
// The bottom row has no bid below it and the top row no ask above it, so they are never compared
for (let r = 1; r < n; r++) {
askImbalance[r] = fp.buy[r] >= minVolume && fp.buy[r] >= ratio * Math.max(fp.sell[r - 1], 1);
}
for (let r = 0; r < n - 1; r++) {
bidImbalance[r] = fp.sell[r] >= minVolume && fp.sell[r] >= ratio * Math.max(fp.buy[r + 1], 1);
}
}
return { askImbalance, bidImbalance };
}

// Runs of at least `length` imbalanced rows in a row: "stacked" imbalances
function stackedRuns(flags, length = 3) {
const runs = [];
let start = -1;
for (let r = 0; r <= flags.length; r++) {
if (r < flags.length && flags[r]) {
if (start < 0) start = r;
} else if (start >= 0) {
if (r - start >= length) runs.push({ from: start, to: r - 1 });
start = -1;
}
}
return runs;
}

// --- The charts ---
const theme = new SciChartJsNavyTheme();
const GREEN = [38, 166, 154];
const RED = [239, 83, 80];
const argb = (alpha, rgb) => ((Math.round(alpha * 255) << 24) | (rgb[0] << 16) | (rgb[1] << 8) | rgb[2]) >>> 0;
const timeLabel = (bar) => {
const minutes = SESSION_START_MINUTES + Math.round(bar) * BAR_MINUTES;
return `${String(Math.floor(minutes / 60)).padStart(2, "0")}:${String(minutes % 60).padStart(2, "0")}`;
};
// A palette provider that gives each rectangle (or column) its own colour from an array we fill in
const arrayPalette = (colourAt) => ({
fillPaletteMode: EFillPaletteMode.SOLID,
strokePaletteMode: EStrokePaletteMode.SOLID,
isRangeIndependant: true,
onAttached: () => {},
onDetached: () => {},
overrideFillArgb: (x, y, index) => colourAt(index, y),
overrideStrokeArgb: (x, y, index) => colourAt(index, y)
});

// 1. The price pane: candles, and the footprint drawn over them with rectangles and text
const price = await SciChartSurface.create(ui.priceDiv, { theme });
const priceXAxis = new NumericAxis(price.wasmContext, { drawLabels: false, drawMinorGridLines: false });
const priceYAxis = new NumericAxis(price.wasmContext, {
axisAlignment: EAxisAlignment.Right,
autoRange: EAutoRange.Never, // fitted to the visible bars below
labelPrecision: 2,
drawMinorGridLines: false
});
price.sciChartSurface.xAxes.add(priceXAxis);
price.sciChartSurface.yAxes.add(priceYAxis);

const ohlc = new OhlcDataSeries(price.wasmContext, { dataSeriesName: "Price" });
const candles = new FastCandlestickRenderableSeries(price.wasmContext, {
dataSeries: ohlc,
dataPointWidth: 0.7,
brushUp: "#26a69a",
strokeUp: "#26a69a",
brushDown: "#ef5350",
strokeDown: "#ef5350",
strokeThickness: 1
});
const rectangles = (options) =>
new FastRectangleRenderableSeries(price.wasmContext, {
dataSeries: new XyxyDataSeries(price.wasmContext, { dataIsSortedInX: false }),
columnXMode: EColumnMode.StartEnd, // x to x1
columnYMode: EColumnYMode.TopBottom, // y (top) to y1 (bottom)
strokeThickness: 0,
...options
});
let cellColours = [];
const valueAreaBands = rectangles({ fill: "#FFFFFF1A" });
const cells = rectangles({ paletteProvider: arrayPalette((index) => cellColours[index]) });
const pocOutline = rectangles({ fill: "#00000000", stroke: "#FFD54A", strokeThickness: 2 });
let stackColours = [];
const stackMarkers = rectangles({ paletteProvider: arrayPalette((index) => stackColours[index]) });
const text = (colour) =>
new FastTextRenderableSeries(price.wasmContext, {
dataSeries: new XyTextDataSeries(price.wasmContext, { dataIsSortedInX: false }),
dataLabels: {
style: { fontSize: 11, fontFamily: "Arial" },
color: colour,
horizontalTextPosition: EHorizontalTextPosition.Center,
verticalTextPosition: EVerticalTextPosition.Center
}
});
const plainText = text("#F2F5FA");
const highlightText = text("#0B1530"); // dark text on the bright imbalance cells
const footprintSeries = [valueAreaBands, cells, pocOutline, stackMarkers, plainText, highlightText];
// Footprint behind, the candle over it as a thin line, numbers on top
price.sciChartSurface.renderableSeries.add(valueAreaBands, cells, pocOutline, stackMarkers, candles, plainText, highlightText);

// 2. The delta pane: buy minus sell volume per bar (columns) and the running total, cumulative delta (line)
const delta = await SciChartSurface.create(ui.deltaDiv, { theme });
const deltaXAxis = new NumericAxis(delta.wasmContext, { drawMinorGridLines: false });
deltaXAxis.labelProvider.formatLabel = timeLabel;
deltaXAxis.labelProvider.formatCursorLabel = timeLabel;
delta.sciChartSurface.xAxes.add(deltaXAxis);
delta.sciChartSurface.yAxes.add(
new NumericAxis(delta.wasmContext, {
id: "delta",
autoRange: EAutoRange.Always, // fit the visible bars
axisTitle: "Delta",
labelPrecision: 0,
axisAlignment: EAxisAlignment.Right,
growBy: new NumberRange(0.25, 0.25),
drawMinorGridLines: false
}),
new NumericAxis(delta.wasmContext, {
id: "cumulative",
autoRange: EAutoRange.Always, // fit the visible bars
axisTitle: "Cum. delta",
labelPrecision: 0,
axisAlignment: EAxisAlignment.Left,
growBy: new NumberRange(0.1, 0.1),
drawMajorGridLines: false,
drawMinorGridLines: false
})
);
// Bar delta as two column series, buyers ahead in green and sellers ahead in red (NaN leaves a gap)
const positiveDelta = new XyDataSeries(delta.wasmContext, { dataSeriesName: "Delta", containsNaN: true });
const negativeDelta = new XyDataSeries(delta.wasmContext, { dataSeriesName: "Delta", containsNaN: true });
const cumulativeDelta = new XyDataSeries(delta.wasmContext, { dataSeriesName: "Cumulative delta" });
const deltaColumns = (dataSeries, colour) =>
new FastColumnRenderableSeries(delta.wasmContext, {
dataSeries,
yAxisId: "delta",
dataPointWidth: 0.6,
fill: colour + "D9",
stroke: colour,
dataLabels: { style: { fontSize: 12, fontFamily: "Arial" }, color: "#F2F5FA", precision: 0 }
});
delta.sciChartSurface.renderableSeries.add(
deltaColumns(positiveDelta, "#26A69A"),
deltaColumns(negativeDelta, "#EF5350"),
new FastLineRenderableSeries(delta.wasmContext, {
dataSeries: cumulativeDelta,
yAxisId: "cumulative",
stroke: "#50C7E0",
strokeThickness: 2
})
);

const fullRange = new NumberRange(-0.6, BAR_COUNT - 0.4);
const zoomTo = (min, max) => priceXAxis.animateVisibleRange(new NumberRange(min, max), 400);

// Line up the two panes' axes, and zoom and pan them together in time
const group = new SciChartVerticalGroup();
group.addSurfaceToGroup(price.sciChartSurface);
group.addSurfaceToGroup(delta.sciChartSurface);
for (const surface of [price.sciChartSurface, delta.sciChartSurface]) {
surface.chartModifiers.add(
new ZoomPanModifier({ xyDirection: EXyDirection.XDirection }),
new MouseWheelZoomModifier({ xyDirection: EXyDirection.XDirection }),
// Double-click resets to all the bars
new ZoomExtentsModifier({
xyDirection: EXyDirection.XDirection,
onZoomExtents: () => {
zoomTo(fullRange.min, fullRange.max);
return false;
}
}),
new CursorModifier({ showTooltip: false, showAxisLabels: true, crosshairStroke: "#C8D3E8AA" })
);
}

// --- Build the data and redraw on every zoom, pan or control change ---
let footprints = [];
let stats = [];
let rowTicks = 1;

// Candles, delta and cumulative delta: rebuilt when the row size changes
function onRowSizeChanged() {
rowTicks = Number(ui.rowSelect.value);
footprints = trades.map((barTrades) => buildFootprint(barTrades, rowTicks));
stats = footprints.map((fp) => valueArea(fp));
ohlc.clear();
positiveDelta.clear();
negativeDelta.clear();
cumulativeDelta.clear();
let running = 0;
footprints.forEach((fp, i) => {
ohlc.append(i, fp.open, fp.high, fp.low, fp.close);
running += stats[i].delta;
positiveDelta.append(i, stats[i].delta >= 0 ? stats[i].delta : NaN);
negativeDelta.append(i, stats[i].delta < 0 ? stats[i].delta : NaN);
cumulativeDelta.append(i, running);
});
onViewChanged();
}

// Fit the price axis to the visible bars, switch between candles and footprint by bar width, and redraw the footprint
function onViewChanged() {
const view = priceXAxis.visibleRange;
const first = Math.max(0, Math.ceil(view.min - 0.5));
const last = Math.min(BAR_COUNT - 1, Math.floor(view.max + 0.5));
if (last < first) return;
let low = Infinity;
let high = -Infinity;
for (let i = first; i <= last; i++) {
low = Math.min(low, footprints[i].low);
high = Math.max(high, footprints[i].high);
}
const pad = Math.max((high - low) * 0.04, TICK * rowTicks);
priceYAxis.visibleRange = new NumberRange(low - pad, high + pad);
// Ticks on whole bars only, so each label is one bar's start time
deltaXAxis.autoTicks = false;
deltaXAxis.majorDelta = Math.max(1, [1, 2, 5, 10].find((step) => (view.max - view.min) / step <= 10) ?? 10);
deltaXAxis.minorDelta = deltaXAxis.majorDelta;

const rect = price.sciChartSurface.seriesViewRect;
const plotWidth = rect ? rect.width / window.devicePixelRatio : 800;
const plotHeight = rect ? rect.height / window.devicePixelRatio : 400;
const barPixels = plotWidth / (view.max - view.min);
const rowPixels = ((TICK * rowTicks) / (high + 2 * pad - low)) * plotHeight;
const showFootprint = barPixels >= 34;
const showNumbers = showFootprint && barPixels >= 90 && rowPixels >= 11;
candles.dataPointWidth = showFootprint ? 0.03 : 0.7; // a thin line through the footprint
for (const series of footprintSeries) series.isVisible = showFootprint;
if (showFootprint) drawFootprint(first, last, showNumbers);
}

function drawFootprint(first, last, showNumbersInView) {
// Text isn't clipped to the chart area, so numbers are drawn only for bars and rows fully on screen
const view = priceXAxis.visibleRange;
const prices = priceYAxis.visibleRange;
const mode = ui.modeSelect.value;
const ratio = Number(ui.imbalanceSelect.value);
const rowHeight = TICK * rowTicks;
const half = 0.4; // half the width of a bar's footprint, in bars
const cellX = [], cellX1 = [], cellY = [], cellY1 = [];
const vaX = [], vaX1 = [], vaY = [], vaY1 = [];
const pocX = [], pocX1 = [], pocY = [], pocY1 = [];
const stackX = [], stackX1 = [], stackY = [], stackY1 = [];
const textX = [], textY = [], textValue = [];
const hiX = [], hiY = [], hiValue = [];
cellColours = [];
stackColours = [];
// Row r's top and bottom price: rows are centred on the prices they hold
const rowTop = (fp, r) => ((fp.lowRow + r) * rowTicks + rowTicks - 1) * TICK + TICK / 2;
const rowBottom = (fp, r) => (fp.lowRow + r) * rowTicks * TICK - TICK / 2;
const addCell = (x, x1, fp, r, colour) => {
const gap = rowHeight * 0.06;
cellX.push(x);
cellX1.push(x1);
cellY.push(rowTop(fp, r) - gap);
cellY1.push(rowBottom(fp, r) + gap);
cellColours.push(colour);
};
const addText = (x, fp, r, value, highlighted) => {
const y = (rowTop(fp, r) + rowBottom(fp, r)) / 2;
if (rowTop(fp, r) > prices.max || rowBottom(fp, r) < prices.min) return;
(highlighted ? hiX : textX).push(x);
(highlighted ? hiY : textY).push(y);
(highlighted ? hiValue : textValue).push(value);
};

for (let i = first; i <= last; i++) {
const fp = footprints[i];
const s = stats[i];
const showNumbers = showNumbersInView && i - 0.5 >= view.min && i + 0.5 <= view.max;
const { askImbalance, bidImbalance } = imbalances(fp, ratio);
const n = fp.buy.length;
const maxSide = Math.max(1, ...fp.buy, ...fp.sell);
const maxTotal = Math.max(1, ...fp.buy.map((b, r) => b + fp.sell[r]));
const maxDelta = Math.max(1, ...fp.buy.map((b, r) => Math.abs(b - fp.sell[r])));
for (let r = 0; r < n; r++) {
const buy = fp.buy[r];
const sell = fp.sell[r];
if (mode === "bidask") {
// Bid (sell) volume on the left, ask (buy) volume on the right; brighter for more volume,
// and a bright solid colour for an imbalance
addCell(i - half, i, fp, r, bidImbalance[r] ? argb(1, [255, 82, 110]) : argb(0.12 + 0.6 * (sell / maxSide), RED));
addCell(i, i + half, fp, r, askImbalance[r] ? argb(1, [0, 230, 160]) : argb(0.12 + 0.6 * (buy / maxSide), GREEN));
if (showNumbers) {
addText(i - half / 2, fp, r, String(sell), bidImbalance[r]);
addText(i + half / 2, fp, r, String(buy), askImbalance[r]);
}
} else if (mode === "profile") {
// A volume profile per bar: total volume as a horizontal bar, split into sell (red) and buy (green)
const width = (2 * half * (buy + sell)) / maxTotal;
const split = i - half + (width * sell) / Math.max(1, buy + sell);
if (sell > 0) addCell(i - half, split, fp, r, argb(0.7, RED));
if (buy > 0) addCell(split, i - half + width, fp, r, argb(0.7, GREEN));
if (showNumbers) addText(i + half - 0.12, fp, r, String(buy + sell), false);
} else {
// Delta per row: buy minus sell, green when buyers were more aggressive, red when sellers were
const d = buy - sell;
addCell(i - half, i + half, fp, r, argb(0.12 + 0.75 * (Math.abs(d) / maxDelta), d >= 0 ? GREEN : RED));
if (showNumbers) addText(i, fp, r, d > 0 ? `+${d}` : String(d), false);
}
}
// Point of control outline and value area band
pocX.push(i - half);
pocX1.push(i + half);
pocY.push(rowTop(fp, s.poc));
pocY1.push(rowBottom(fp, s.poc));
vaX.push(i - half - 0.03);
vaX1.push(i + half + 0.03);
vaY.push(rowTop(fp, s.hi));
vaY1.push(rowBottom(fp, s.lo));
// Stacked imbalances: a bar beside the rows, red on the left for sellers, green on the right for buyers
for (const [flags, x, x1, colour] of [
[bidImbalance, i - half - 0.07, i - half - 0.03, argb(1, [255, 82, 110])],
[askImbalance, i + half + 0.03, i + half + 0.07, argb(1, [0, 230, 160])]
]) {
for (const run of stackedRuns(flags)) {
stackX.push(x);
stackX1.push(x1);
stackY.push(rowTop(fp, run.to));
stackY1.push(rowBottom(fp, run.from));
stackColours.push(colour);
}
}
}
const setRects = (series, x, y, x1, y1) => {
series.dataSeries.clear();
series.dataSeries.appendRange(x, y, x1, y1);
};
setRects(cells, cellX, cellY, cellX1, cellY1);
setRects(pocOutline, pocX, pocY, pocX1, pocY1);
const va = ui.valueAreaCheckbox.checked;
setRects(valueAreaBands, va ? vaX : [], va ? vaY : [], va ? vaX1 : [], va ? vaY1 : []);
setRects(stackMarkers, stackX, stackY, stackX1, stackY1);
const setText = (series, x, y, values) => {
series.dataSeries.clear();
series.dataSeries.appendRange(x, y, values);
};
setText(plainText, textX, textY, textValue);
setText(highlightText, hiX, hiY, hiValue);
}

// --- The controls ---
const footprintView = () => zoomTo(BAR_COUNT - 5.6, BAR_COUNT - 0.4);
let syncing = false;
priceXAxis.visibleRangeChanged.subscribe(() => {
// Keep at least three bars on screen
const { min, max } = priceXAxis.visibleRange;
if (max - min < 3) {
priceXAxis.visibleRange = new NumberRange((min + max) / 2 - 1.5, (min + max) / 2 + 1.5);
return;
}
if (!syncing) {
syncing = true;
deltaXAxis.visibleRange = priceXAxis.visibleRange;
syncing = false;
}
onViewChanged();
});
deltaXAxis.visibleRangeChanged.subscribe(() => {
if (syncing) return;
syncing = true;
priceXAxis.visibleRange = deltaXAxis.visibleRange;
syncing = false;
});
ui.footprintButton.addEventListener("click", footprintView);
ui.candlesButton.addEventListener("click", () => zoomTo(fullRange.min, fullRange.max));
ui.modeSelect.addEventListener("change", onViewChanged);
ui.imbalanceSelect.addEventListener("change", onViewChanged);
ui.valueAreaCheckbox.addEventListener("change", onViewChanged);
ui.rowSelect.addEventListener("change", onRowSizeChanged);
// Redraw once the chart has a size, so the numbers appear or hide for the real bar width
let lastWidth = -1;
price.sciChartSurface.rendered.subscribe(() => {
if (!footprints.length) return;
const rect = price.sciChartSurface.seriesViewRect;
if (rect && rect.width !== lastWidth) {
lastWidth = rect.width;
onViewChanged();
}
});

onRowSizeChanged();
priceXAxis.visibleRange = new NumberRange(BAR_COUNT - 5.6, BAR_COUNT - 0.4);

Key points:

  • Each footprint cell is a rectangle in a FastRectangleRenderableSeries over an XyxyDataSeries, with columnXMode: EColumnMode.StartEnd and columnYMode: EColumnYMode.TopBottom, so x to x1 is the cell's width and y to y1 its height. A palette provider gives every cell its own colour from an array, which is how volume shading and imbalance highlights are drawn.
  • The volumes are a FastTextRenderableSeries with an XyTextDataSeries: one string per x and y, centred with EHorizontalTextPosition.Center and EVerticalTextPosition.Center. The demo only builds text for the bars on screen and hides it when the rows are too small to read.
  • The candles are a FastCandlestickRenderableSeries. Setting dataPointWidth to 0.03 turns each candle into a thin line through its footprint; 0.7 gives normal candles when zoomed out.
  • The delta pane is a second chart with a FastColumnRenderableSeries and a FastLineRenderableSeries on two y axes. A SciChartVerticalGroup lines up the two panes' axes, and each x axis's visibleRangeChanged event keeps them zoomed together.

See it in the demo app: JavaScript candlestick chart · React candlestick chart · Angular candlestick chart, and for resting orders rather than trades, JavaScript depth chart · React depth chart · Angular depth chart.

Go deeper: SciChart.js candlestick chart documentation, the rectangle series documentation and text series documentation for the cells and numbers, and the candlestick chart guide. For how trading software uses SciChart, see SciChart for financial and stock trading applications.

Building a full trading chart?​

SciTrader.js, SciChart's financial charts SDK, has no footprint series, but two of its studies cover the same ground from other data. Its volume profile estimates the volume at each price over the bars on screen from their candles, without a bid and ask split. Its order book heatmap and imbalance studies, fed from order book data, show the resting orders in the book over time: the passive side of the trades a footprint counts. For bid × ask cells, build them from your trade stream as in the demo above. See what it can do on the JavaScript stock charts page.

Frequently asked questions​

What does a footprint chart show?​

A footprint chart shows how much volume traded at each price inside each bar, split into volume sold at the bid and volume bought at the ask. Where a candlestick shows only the open, high, low and close, a footprint shows where in the bar the trading happened and which side started each trade.

How do you read a footprint chart?​

Read one bar at a time. Each row is a price; the left number is volume sold at the bid and the right number is volume bought at the ask. Find the busiest row (the point of control), read the bar's delta (ask volume minus bid volume) underneath, then look for highlighted imbalances, where one side traded several times as much as the other.

What is delta on a footprint chart?​

Delta is the volume bought at the ask minus the volume sold at the bid. A positive delta means buyers who crossed the spread traded more contracts than sellers who did; a negative delta means the reverse. It is shown per price row, per bar and, added up from bar to bar, as cumulative delta.

What is a diagonal imbalance?​

A diagonal imbalance compares the volume bought at the ask at one price with the volume sold at the bid one row lower: at any moment, those two prices are the ask and bid of a single quote. If the ask side is at least the chosen ratio, often 300%, of the bid side, the cell is highlighted as an ask imbalance; the mirror comparison gives a bid imbalance. Three or more in a row are called stacked imbalances.

What is the difference between a footprint chart and a volume profile?​

A volume profile adds up the volume at each price over a whole session or range and draws it as one horizontal histogram. A footprint chart keeps the volume at each price separate for every bar and splits it into bid and ask, so you can see how the trading changed from bar to bar and which side was more aggressive.

How do I make a footprint chart in JavaScript?​

Aggregate your trades into bid and ask volume per bar and price row, then draw each row as two rectangles and two numbers. With SciChart.js, use a FastRectangleRenderableSeries with an XyxyDataSeries for the cells, a FastTextRenderableSeries for the volumes and a FastCandlestickRenderableSeries for the candles. Inside React or Angular, run the same aggregation and series code through scichart-react or scichart-angular.

Sources​

  • CME Group, MDP 3.0: Trade Summary. The exchange's market data specification, including the aggressor side field (buy, sell or none) published with each trade.
  • Lee, C. M. C. and Ready, M. J. (1991), Inferring trade direction from intraday data. The Journal of Finance, 46(2), 733–746. The standard method for classifying trades as buyer- or seller-initiated when the feed doesn't say.
  • Cont, R., Kukanov, A. and Stoikov, S. (2014), The price impact of order book events. Journal of Financial Econometrics, 12(1), 47–88. A study linking short-term price changes to the imbalance between buying and selling pressure at the best bid and ask.
  • Coinbase Exchange, WebSocket channels. The feed documentation, which states that a trade's side field is the maker order side.
  • Steidlmayer, J. P. and Koy, K. (1986), Markets and Market Logic. Porcupine Press. The origin of market profile analysis.
  • Dalton, J. F., Jones, E. T. and Dalton, R. B. (2013), Mind Over Markets: Power Trading with Market Generated Information, updated edition. Wiley. The point of control and the 70% value area, and why 70% is taken as roughly one standard deviation.