Moves the bottom-right corner of a box in one call, changing the right edge and the bottom edge together.
It is the usual way to stretch a box from a fixed anchor to the latest bar and the latest extreme: box.set_rightbottom(z, bar_index, math.min(low, box.get_bottom(z))).
The left and top edges are untouched. Pair it with box.set_lefttop() when both corners move.
Syntax
box.set_rightbottom(id: series box, right: series int, bottom: series int/float) -> void
box.set_rightbottom(right: series int, bottom: series int/float) -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| id | series box | required | The box whose bottom-right corner moves. |
| right | series int | required | New right edge: a bar index, or a timestamp in milliseconds for a box that uses xloc.bar_time. na hides the box. |
| bottom | series int/ | required | New price of the bottom edge, set together with the right edge. na hides the box until a real price is set. |
Returns
Nothing.
Remarks
- On Sidechair: while right or bottom is na the box is not drawn, and the next real pair brings it back.
Example
//@version=6
indicator("box.set_rightbottom: stretch", overlay = true)
var box z = box.new(bar_index, high, bar_index + 1, low, bgcolor = color.new(color.navy, 88))
box.set_rightbottom(z, bar_index, math.min(low, box.get_bottom(z)))See also
Runs on Sidechair