Returns the volume row that contains a given price on a footprint bar.
footprint.get_row_by_price(fp, price) returns the volume_row whose price band holds price, or na when the bar did not trade at that price. Use it to read the volume at a level you already know, such as the prior close or a support line.
Called as a method, fp.get_row_by_price(price) is the same call. Check the result with na() before reading it.
Syntax
footprint.get_row_by_price(id: footprint, price: series int/float) -> volume_row
footprint.get_row_by_price(price: series int/float) -> volume_rowArguments
| 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. |
| price | series int/ | required | The price to look up. The row whose band contains it is returned. |
Returns
volume_row: The row containing the price, or na when the bar has no row there.
Remarks
- On Sidechair: not supported yet; the call warns "
footprint.get_row_by_price()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("Volume at the open")
fp = request.footprint(10, 70)
value = na(fp) ? na : volume_row.total_volume(footprint.get_row_by_price(fp, open))
plot(close, "Close", color.gray)
plot(value, "Volume at the open", color.orange, 2)See also
Not on Sidechair yet