Returns the price of the bottom edge of a box, exactly as it was last stored.
It reads the lower price that box.new() or box.set_bottom() stored. Compare it with low or close to detect a break below the zone.
Subtract it from box.get_top() for the height of the box in price units, or divide a distance by it to express that distance as a percentage of the floor.
Syntax
box.get_bottom(id: series box) -> series float
box.get_bottom() -> series floatArguments
| Name | Type | Default | Description |
|---|---|---|---|
| id | series box | required | The box to read the bottom price from. na gives na back. |
Returns
series float: Price of the bottom edge, as it was last set.
Remarks
- On Sidechair: calling it on na gives na, which plot() shows as a gap.
Example
//@version=6
indicator("box.get_bottom: percent from the floor", overlay = false)
var box z = na
if bar_index % 50 == 0
z := box.new(bar_index, high, bar_index + 50, low, bgcolor = color.new(color.teal, 90))
plot(na(z) ? na : (close - box.get_bottom(z)) / box.get_bottom(z) * 100, "Percent from floor")See also
Runs on Sidechair