Sidechair

footprint.get_row_by_price()

Browse the reference

Returns the volume row that contains a given price on a footprint bar.

Try it in the editor

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

Pine Script
footprint.get_row_by_price(id: footprint, price: series int/float) -> volume_row
footprint.get_row_by_price(price: series int/float) -> volume_row

Arguments

NameTypeDefaultDescription
idfootprintrequiredThe footprint to read, from request.footprint(). In method form, such as fp.delta() or row.delta(), the object before the dot supplies this value.
priceseries int/floatrequiredThe 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

Pine ScriptVolume at the openOpen in editor
//@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