The type for the volume profile of one bar: buy and sell volume at each price row, returned by request.footprint.
A footprint holds the traded volume of a single bar split into price rows, each row separated into buy volume (trades at the ask) and sell volume (trades at the bid). request.footprint() builds one, taking the size of a row in ticks, the percentage of volume the value area should contain, and the imbalance threshold.
Read the whole bar with footprint.total_volume(), footprint.buy_volume(), footprint.sell_volume() and footprint.delta(), the key levels with footprint.poc(), footprint.vah() and footprint.val(), and every row with footprint.rows(). Each row is a volume_row.
Remarks
- Footprint data needs trade-level volume for the symbol. The result is na where none exists, so guard with na() before reading it.
- On Sidechair: not supported yet;
request.footprint()warns that data from other symbols or timeframes isn't supported and returns na, and every footprint.* call warns "footprint.<name>() isn't supported yet; that part shows nothing." and returns na. The rest of the script runs.
Example
//@version=6
indicator("Footprint delta")
fp = request.footprint(10, 70)
d = na(fp) ? na : footprint.delta(fp)
plot(close, "Close", color.gray)
plot(d, "Delta", d >= 0 ? color.green : color.red, style = plot.style_columns)See also
Runs on Sidechair