box
forge.drawfunctionSince Forge API 1
Signaturepython
forge.draw.box(left: int | Point,top: float,right: int | Point,bottom: float,*,fill: Color | str | None = None,border: Color | str | None = None,border_width: float = 1.0,border_dash: str = 'solid',text: str = '',text_color: Color | str | None = None,size: str = 'normal',bold: bool = False,italic: bool = False,align: str = 'center',font: str = 'default',extend: str = 'none',id: str | None = None) -> DrawingA rectangle between two bars and two prices, with optional text inside.
Parameters
| Name | Type | Default |
|---|---|---|
| left | int | Point | |
| top | float | |
| right | int | Point | |
| bottom | float | |
| fill | Color | str | None | None |
| border | Color | str | None | None |
| border_width | float | 1.0 |
| border_dash | str | 'solid' |
| text | str | '' |
| text_color | Color | str | None | None |
| size | str | 'normal' |
| bold | bool | False |
| italic | bool | False |
| align | str | 'center' |
| font | str | 'default' |
| extend | str | 'none' |
| id | str | None | None |
The corners are put in order: left is the earlier bar and top the higher price. A
Point corner takes its price from top and bottom, so it carries none of its own.