Sidechair

box.set_bottom()

Browse the reference

Moves the bottom edge of a box to a new price, leaving the top edge and both sides unchanged.

Try it in the editor

Only the lower boundary changes, so lowering it deepens the box downward and raising it shrinks the box from below.

Tie it to a volatility measure such as close - 2 * ta.atr(14) for a floor that follows price, or to ta.lowest() for a plain range.

Syntax

Pine Script
box.set_bottom(id: series box, bottom: series int/float) -> void
box.set_bottom(bottom: series int/float) -> void

Arguments

NameTypeDefaultDescription
idseries boxrequiredThe box whose bottom edge moves.
bottomseries int/floatrequiredNew price of the bottom edge, in the chart's price units. na hides the box until a real price is set.

Returns

Nothing.

Remarks

  • On Sidechair: a bottom set above the top is stored as given and still draws a rectangle between the two prices; box.get_bottom() reports the stored value.

Example

Pine ScriptFloor two ATRs under the closeOpen in editor
//@version=6
indicator("box.set_bottom: trailing floor", overlay = true)
atr = ta.atr(14)
var box z = box.new(bar_index, high, bar_index + 1, low, bgcolor = color.new(color.blue, 88))
box.set_right(z, bar_index)
box.set_bottom(z, close - 2 * atr)

See also

Runs on Sidechair