Changes the thickness of a box's outline in pixels, with 0 hiding the outline.
A width of 1 is a hairline and each step adds a pixel. The fill and the text are not affected.
Thicken the outline on the bar where a zone is touched so the event stands out, then drop back to 1.
Syntax
box.set_border_width(id: series box, width: series int) -> void
box.set_border_width(width: series int) -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| id | series box | required | The box whose outline thickness changes. |
| width | series int | required | Outline thickness in pixels; the default for a new box is 1. Use 0 to hide the outline. |
Returns
Nothing.
Remarks
- On Sidechair: the outline is drawn centred on the edge, and a width of 0, a negative width or na draws no outline.
Example
//@version=6
indicator("box.set_border_width: touch", overlay = true)
var box z = box.new(bar_index, high, bar_index + 1, low, bgcolor = color.new(color.gray, 90))
box.set_right(z, bar_index)
box.set_border_width(z, high >= box.get_top(z) ? 3 : 1)See also
Runs on Sidechair