fp
Footprints (Pro and Elite): the buy and sell volume at each price row inside a bar, the same data the Footprint chart draws, for the chart’s own market and venue (no other venue is used). Every value is read on the RECORDED GRID (50 rows per 1 % of price, BTC $20), so it is the same at any zoom, in replay and on ChartDeck’s servers. Sources in the chart’s order: the live footprint, the STRATA recording, days rebuilt from the trade archive. Below Pro, or on a market or timeframe without footprints (1 minute to 1 day), every fp.* value is na and the legend says why. The per-bar series work inside requests: request.lower_tf("1", fp.min_delta_px) gives the 1-minute bars’ values inside each bar. A script reads about the newest 10,000 bars of each timeframe (42 pages of 240); older bars, bars before the recording and days the archive has not rebuilt read na (never 0), and a script never starts an archive rebuild. The forming bar’s values move until it closes (gate on barstate.isconfirmed); in replay only the bars closed at the clock. A reading aid, not a forecast.
#Functions
#fp.delta_atfunction
The delta (buys minus sells) of the row holding price in a bar: 0 for a row inside the bar’s range where nothing traded, na outside its rows or where the bar has no footprint.
fp.delta_at(price: float, { back?: int = 0 }): float| Parameter | Type | Description |
|---|---|---|
price | float | The price to look up. |
back | intdefault 0 | How many bars back: 0 = this bar, 1 = the one before. |
Returns float.
Example
const atLow = fp.delta_at(low)Since ChartScript 1
#fp.rowsfunction
The footprint rows of a bar on the recorded grid, low to high: an array of fp.row (at most 400; on a wider bar the 400 around its point of control). Empty where the bar has no footprint. The chart’s own market only: inside a request expression it reads the chart’s bars (CS3124).
fp.rows({ back?: int = 0 }): array<fp.row>| Parameter | Type | Description |
|---|---|---|
back | intdefault 0 | How many bars back: 0 = this bar, 1 = the one before. |
Returns array<fp.row>.
Example
if (barstate.islast) {
for (const r of fp.rows()) {
if (r.delta < 0) {
label.new(time, r.price, str.tostring(r.delta, format.volume), xloc.bar_time)
}
}
}Since ChartScript 1
#fp.sincefunction
Where the footprint history the script can read starts: the time (ms) of the first bar with footprint rows, na when there is none. Without a timeframe (or the chart’s own): the chart’s bars. With another timeframe: the bars the script reads at that timeframe through request.lower_tf(timeframe, fp.) (the same pages and the same 10,000-bar cap), so on a 5m chart fp.since("1") is where its 1-minute readings start; na when the script reads no fp. at that timeframe. In replay never after the clock.
fp.since({ timeframe?: simple string = "" }): int| Parameter | Type | Description |
|---|---|---|
timeframe | simple stringdefault "" | "" = the chart’s timeframe; another one ("1", "5" ...) = the footprint the script reads at that timeframe through request.lower_tf. |
Returns int.
Example
const from1m = fp.since("1")Since ChartScript 1
#Variables
#fp.availablevariable
true when the bar has footprint rows (the Footprint chart’s data for the chart’s own market and timeframe).
fp.available: boolType series bool.
Example
const has = fp.availableSince ChartScript 1
#fp.buy_volvariable
Buy volume of the bar summed over its rows (trades that lifted the ask), base coin. na where the bar has no footprint.
fp.buy_vol: floatType series float.
Example
const b = fp.buy_volSince ChartScript 1
#fp.deltavariable
fp.buy_vol minus fp.sell_vol. na where the bar has no footprint.
fp.delta: floatType series float.
Example
const d = fp.deltaSince ChartScript 1
#fp.high_deltavariable
Net delta of the bar’s high zone: the top 25 % of its rows (2 at least). na on a bar of fewer than 4 rows.
fp.high_delta: floatType series float.
Example
const d = fp.high_deltaSince ChartScript 1
#fp.high_readvariable
The Extremes reading of the high zone: 1 = initiative (buying at the high), -1 = responsive (selling at the high), 0 = neither side clear. na on a bar of fewer than 4 rows.
fp.high_read: intType series int.
Example
const r = fp.high_readSince ChartScript 1
#fp.low_deltavariable
Net delta of the bar’s low zone: the bottom 25 % of its rows (2 at least), the Footprint chart’s Extremes zone. na on a bar of fewer than 4 rows.
fp.low_delta: floatType series float.
Example
const d = fp.low_deltaSince ChartScript 1
#fp.low_readvariable
The Footprint chart’s Extremes reading of the low zone, with its default settings: 1 = initiative (selling at the low), -1 = responsive (buying at the low), 0 = neither side clear (the zone holds under 20 % of the bar’s volume, or its net is under 35 % of its volume). The chart also leaves out bars quieter than its view; scripts compare volumes themselves. na on a bar of fewer than 4 rows.
fp.low_read: intType series int.
Example
const r = fp.low_readSince ChartScript 1
#fp.max_buy_pxvariable
The middle price of the row with the most buy volume. na where the bar has no footprint.
fp.max_buy_px: floatType series float.
Example
const px = fp.max_buy_pxSince ChartScript 1
#fp.max_buy_qtyvariable
The buy volume of that row, base coin. na where the bar has no footprint.
fp.max_buy_qty: floatType series float.
Example
const q = fp.max_buy_qtySince ChartScript 1
#fp.max_deltavariable
The delta of that row. na where the bar has no footprint.
fp.max_delta: floatType series float.
Example
const d = fp.max_deltaSince ChartScript 1
#fp.max_delta_pxvariable
The middle price of the row with the most positive delta: where buyers lifted hardest. na where the bar has no footprint.
fp.max_delta_px: floatType series float.
Example
const px = fp.max_delta_pxSince ChartScript 1
#fp.max_sell_pxvariable
The middle price of the row with the most sell volume. na where the bar has no footprint.
fp.max_sell_px: floatType series float.
Example
const px = fp.max_sell_pxSince ChartScript 1
#fp.max_sell_qtyvariable
The sell volume of that row, base coin. na where the bar has no footprint.
fp.max_sell_qty: floatType series float.
Example
const q = fp.max_sell_qtySince ChartScript 1
#fp.min_deltavariable
The delta of that row (negative when sellers dominated it). na where the bar has no footprint.
fp.min_delta: floatType series float.
Example
const d = fp.min_deltaSince ChartScript 1
#fp.min_delta_pxvariable
The middle price of the row with the most negative delta (buys minus sells): where sellers hit hardest. na where the bar has no footprint.
fp.min_delta_px: floatType series float.
Example
const px = fp.min_delta_pxSince ChartScript 1
#fp.pocvariable
The middle price of the row with the most volume (the bar’s point of control; on a tie the lower row). na where the bar has no footprint.
fp.poc: floatType series float.
Example
plot(fp.poc, "POC", color.accent, { style: plot.style_circles })Since ChartScript 1
#fp.row_sizevariable
The row height in price used for every fp.* value of the bar (the recorded grid: 50 rows per 1 % of price, BTC $20). na where the bar has no footprint.
fp.row_size: floatType series float.
Example
const row = fp.row_sizeSince ChartScript 1
#fp.sell_volvariable
Sell volume of the bar summed over its rows (trades that hit the bid), base coin. na where the bar has no footprint.
fp.sell_vol: floatType series float.
Example
const s = fp.sell_volSince ChartScript 1