Skip to content
ChartDeck ChartScript docs Account Open the terminal

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
ParameterTypeDescription
pricefloatThe price to look up.
backintdefault 0How many bars back: 0 = this bar, 1 = the one before.

Returns float.

Example

ChartScriptFragmentOpen in editor
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>
ParameterTypeDescription
backintdefault 0How many bars back: 0 = this bar, 1 = the one before.

Returns array<fp.row>.

Example

ChartScriptFragmentOpen in editor
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
ParameterTypeDescription
timeframesimple stringdefault """" = the chart’s timeframe; another one ("1", "5" ...) = the footprint the script reads at that timeframe through request.lower_tf.

Returns int.

Example

ChartScriptFragmentOpen in editor
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: bool

Type series bool.

Example

ChartScriptFragmentOpen in editor
const has = fp.available

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const b = fp.buy_vol

Since ChartScript 1

#fp.deltavariable

fp.buy_vol minus fp.sell_vol. na where the bar has no footprint.

fp.delta: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const d = fp.delta

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const d = fp.high_delta

Since 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: int

Type series int.

Example

ChartScriptFragmentOpen in editor
const r = fp.high_read

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const d = fp.low_delta

Since 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: int

Type series int.

Example

ChartScriptFragmentOpen in editor
const r = fp.low_read

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const px = fp.max_buy_px

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const q = fp.max_buy_qty

Since ChartScript 1

#fp.max_deltavariable

The delta of that row. na where the bar has no footprint.

fp.max_delta: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const d = fp.max_delta

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const px = fp.max_delta_px

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const px = fp.max_sell_px

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const q = fp.max_sell_qty

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const d = fp.min_delta

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const px = fp.min_delta_px

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const row = fp.row_size

Since 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: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const s = fp.sell_vol

Since ChartScript 1

The ChartScript documentation is in English for now; translations will follow.