Skip to content
ChartDeck ChartScript docs Account Open the terminal

vap

Volume at price from recorded trades (Plus, Pro and Elite): the volume traded at each price of a day, a week or a month, buys and sells apart. ChartDeck data: Binance Futures where the market is recorded there, else all recorded exchanges together. Periods are UTC: a day, a week from Monday, a calendar month.

#Functions

#vap.pocfunction

The point of control of a profile: the middle of the price row with the most volume. na without data.

vap.poc({ period?: string = "D", back?: int = 1 }): float
ParameterTypeDescription
periodstringdefault "D""D" (day), "W" (week) or "M" (month).
backintdefault 1How many periods back from the bar's own: 1 = the last finished one, 2 = the one before, 0 = the developing period up to this bar.

Returns float.

Example

ChartScriptFragmentOpen in editor
plot(vap.poc("D", 1), "Previous day POC")

Since ChartScript 1

#vap.profilefunction

One period's volume at price as a heatmap.column: time is the period's start, span its length, bottom the lower edge of the lowest row, step the row size, values the volume of each row from the bottom up (base coin), max the largest. na where nothing is recorded. With back = 0 it is the developing period: the volume from its start to this bar's close, exact in 15-minute steps for the last 7 days (the newest bar is up to the minute) and in whole days before that.

vap.profile({ period?: string = "D", back?: int = 1, side?: string = "both" }): heatmap.column
ParameterTypeDescription
periodstringdefault "D""D" (day), "W" (week) or "M" (month).
backintdefault 1How many periods back from the bar's own: 1 = the last finished one, 2 = the one before, 0 = the developing period up to this bar.
sidestringdefault "both""both", "buy" (trades that lifted the ask) or "sell" (trades that hit the bid).

Returns heatmap.column.

Example

ChartScriptFragmentOpen in editor
const p = vap.profile("D", 1)
if (!na(p)) {
    const busiest = array.max(p.values)
}

Since ChartScript 1

#vap.sincefunction

The time (ms) where the recorded volume at price ChartDeck gave this script begins, na without data.

vap.since(): int

Returns int.

Example

ChartScriptFragmentOpen in editor
const from = vap.since()

Since ChartScript 1

#vap.sourcefunction

Where the volume comes from: "Binance Futures" or "All exchanges". Empty without data.

vap.source(): string

Returns string.

Example

ChartScriptFragmentOpen in editor
legend.info("Volume from", vap.source())

Since ChartScript 1

#vap.stepfunction

The height of one profile row in price. The same for every profile the script reads on this chart. na without data.

vap.step(): float

Returns float.

Example

ChartScriptFragmentOpen in editor
const row = vap.step()

Since ChartScript 1

#vap.vahfunction

The value area high: the top edge of the value area around the point of control. The area grows one row at a time, taking the larger of the row above and the row below, until it holds the given share of the period's volume. na without data.

vap.vah({ period?: string = "D", back?: int = 1, percent?: float = 70 }): float
ParameterTypeDescription
periodstringdefault "D""D" (day), "W" (week) or "M" (month).
backintdefault 1How many periods back from the bar's own: 1 = the last finished one, 0 = the developing period up to this bar.
percentfloatdefault 70The share of the volume inside the value area, 1 to 100. 70 by default.

Returns float.

Example

ChartScriptFragmentOpen in editor
plot(vap.vah("D", 1), "Previous day VAH")

Since ChartScript 1

#vap.valfunction

The value area low: the bottom edge of the value area around the point of control (see vap.vah). na without data.

vap.val({ period?: string = "D", back?: int = 1, percent?: float = 70 }): float
ParameterTypeDescription
periodstringdefault "D""D" (day), "W" (week) or "M" (month).
backintdefault 1How many periods back from the bar's own: 1 = the last finished one, 0 = the developing period up to this bar.
percentfloatdefault 70The share of the volume inside the value area, 1 to 100. 70 by default.

Returns float.

Example

ChartScriptFragmentOpen in editor
plot(vap.val("D", 1), "Previous day VAL")

Since ChartScript 1

#vap.volumefunction

The total volume of a profile (base coin), or only its buys or sells. na without data.

vap.volume({ period?: string = "D", back?: int = 1, side?: string = "both" }): float
ParameterTypeDescription
periodstringdefault "D""D" (day), "W" (week) or "M" (month).
backintdefault 1How many periods back from the bar's own: 1 = the last finished one, 0 = the developing period up to this bar.
sidestringdefault "both""both", "buy" or "sell".

Returns float.

Example

ChartScriptFragmentOpen in editor
const buys = vap.volume("D", 1, "buy")

Since ChartScript 1

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