The buy volume of a footprint bar: volume traded at the ask, summed over every price row.
footprint.buy_volume(fp) returns how much volume traded as buys across the bar, meaning trades that hit the ask. The bar's sell volume is footprint.sell_volume().
Called as a method, fp.buy_volume() is the same call. Divide it by footprint.total_volume() to get the buying share of the bar.
Syntax
footprint.buy_volume(id: footprint) -> series float
footprint.buy_volume() -> series floatArguments
| Name | Type | Default | Description |
|---|---|---|---|
| id | footprint | required | The footprint to read, from request.footprint(). In method form, such as fp.delta() or row.delta(), the object before the dot supplies this value. |
Returns
series float: The buy volume of the whole bar.
Remarks
- On Sidechair: not supported yet; the call warns "
footprint.buy_volume()isn't supported yet; that part shows nothing." and returns na.request.footprint()also returns na, so a script that guards with na() runs and shows only its other output.
Example
//@version=6
indicator("Footprint buy volume")
fp = request.footprint(10, 70)
value = na(fp) ? na : footprint.buy_volume(fp)
plot(close, "Close", color.gray)
plot(value, "Buy volume", color.orange, 2)See also
Not on Sidechair yet