Reference
Boxes
Rectangles between two corners.
box.copy(id)
A copy of the box.
Returns: box
| Parameter | Type |
|---|---|
id | box |
box.delete(id)
Removes the box.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
box.get_bottom(id)
Bottom edge.
Returns: a number
| Parameter | Type |
|---|---|
id | box |
box.get_left(id)
Left edge.
Returns: a whole number
| Parameter | Type |
|---|---|
id | box |
box.get_right(id)
Right edge.
Returns: a whole number
| Parameter | Type |
|---|---|
id | box |
box.get_top(id)
Top edge.
Returns: a number
| Parameter | Type |
|---|---|
id | box |
box.new(left, top, right, bottom, border_color=na, border_width=1, border_style="solid", extend="none", xloc="bar_index", bgcolor=na, text="", text_size="auto", text_color=na, text_halign="center", text_valign="center")
Creates a box and returns its id.
Returns: box
| Parameter | Type | Notes |
|---|---|---|
left | num | |
top | num | |
right | num | |
bottom | num | |
border_color | color | Default na |
border_width | int | Default 1 |
border_style | string | Default "solid" |
extend | string | Default "none" |
xloc | string | Default "bar_index" |
bgcolor | color | Default na |
text | string | Default "" |
text_size | string | Default "auto" |
text_color | color | Default na |
text_halign | string | Default "center" |
text_valign | string | Default "center" |
box.set_bgcolor(id, color)
Changes the fill color.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
color | color |
box.set_border_color(id, color)
Changes the border color.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
color | color |
box.set_border_style(id, style)
Changes the border style.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
style | string |
box.set_border_width(id, width)
Changes the border width.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
width | int |
box.set_bottom(id, bottom)
Moves the bottom edge.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
bottom | num |
box.set_extend(id, extend)
Extends the box left, right, both or none.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
extend | string |
box.set_left(id, left)
Moves the left edge.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
left | num |
box.set_lefttop(id, left, top)
Moves the top-left corner.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
left | num |
top | num |
box.set_right(id, right)
Moves the right edge.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
right | num |
box.set_rightbottom(id, right, bottom)
Moves the bottom-right corner.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
right | num |
bottom | num |
box.set_text(id, text)
Changes the text.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
text | string |
box.set_text_color(id, text_color)
Changes the text color.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
text_color | color |
box.set_top(id, top)
Moves the top edge.
Returns: nothing
| Parameter | Type |
|---|---|
id | box |
top | num |
Education only. Not financial advice. Examples are teaching samples, not trading results.
