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| Parameter | Type | Description |
|---|---|---|
period | stringdefault "D" | "D" (day), "W" (week) or "M" (month). |
back | intdefault 1 | How 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
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| Parameter | Type | Description |
|---|---|---|
period | stringdefault "D" | "D" (day), "W" (week) or "M" (month). |
back | intdefault 1 | How 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. |
side | stringdefault "both" | "both", "buy" (trades that lifted the ask) or "sell" (trades that hit the bid). |
Returns heatmap.column.
Example
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(): intReturns int.
Example
const from = vap.since()Since ChartScript 1
#vap.sourcefunction
Where the volume comes from: "Binance Futures" or "All exchanges". Empty without data.
vap.source(): stringReturns string.
Example
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(): floatReturns float.
Example
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| Parameter | Type | Description |
|---|---|---|
period | stringdefault "D" | "D" (day), "W" (week) or "M" (month). |
back | intdefault 1 | How many periods back from the bar's own: 1 = the last finished one, 0 = the developing period up to this bar. |
percent | floatdefault 70 | The share of the volume inside the value area, 1 to 100. 70 by default. |
Returns float.
Example
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| Parameter | Type | Description |
|---|---|---|
period | stringdefault "D" | "D" (day), "W" (week) or "M" (month). |
back | intdefault 1 | How many periods back from the bar's own: 1 = the last finished one, 0 = the developing period up to this bar. |
percent | floatdefault 70 | The share of the volume inside the value area, 1 to 100. 70 by default. |
Returns float.
Example
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| Parameter | Type | Description |
|---|---|---|
period | stringdefault "D" | "D" (day), "W" (week) or "M" (month). |
back | intdefault 1 | How many periods back from the bar's own: 1 = the last finished one, 0 = the developing period up to this bar. |
side | stringdefault "both" | "both", "buy" or "sell". |
Returns float.
Example
const buys = vap.volume("D", 1, "buy")Since ChartScript 1