True when one footprint row shows a buy imbalance: buying far outweighs the selling it is compared with.
volume_row.has_buy_imbalance(row) is true when the row's buy volume exceeds the comparison sell volume by at least the imbalance_percent you passed to request.footprint(). Stacked buy imbalances on consecutive rows are read as strong buying pressure.
Called as a method, row.has_buy_imbalance() is the same call. volume_row.has_sell_imbalance() is the matching test for sellers.
Syntax
volume_row.has_buy_imbalance(id: volume_row) -> series bool
volume_row.has_buy_imbalance() -> series boolArguments
| Name | Type | Default | Description |
|---|---|---|---|
| id | volume_row | required | The volume row to read, from footprint.rows(), footprint.get_row_by_price(), footprint.poc(), footprint.vah() or footprint.val(). In method form, such as fp.delta() or row.delta(), the object before the dot supplies this value. |
Returns
series bool: True when the row has a buy imbalance, false otherwise.
Remarks
- On Sidechair: not supported yet; the call warns "
volume_row.has_buy_imbalance()isn't supported yet; that part shows nothing." and returns na. The rest of the script runs.
Example
//@version=6
indicator("Buy imbalance", overlay = true)
fp = request.footprint(10, 70, 300)
row = na(fp) ? na : footprint.poc(fp)
flag = na(row) ? false : volume_row.has_buy_imbalance(row)
plot(close, "Close", color.gray)
plotshape(flag, "Buy imbalance", shape.triangleup, location.belowbar, color.green, size = size.tiny)See also
Not on Sidechair yet