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) -> Drawing

A rectangle between two bars and two prices, with optional text inside.

Parameters

NameTypeDefault
leftint | Point
topfloat
rightint | Point
bottomfloat
fillColor | str | NoneNone
borderColor | str | NoneNone
border_widthfloat1.0
border_dashstr'solid'
textstr''
text_colorColor | str | NoneNone
sizestr'normal'
boldboolFalse
italicboolFalse
alignstr'center'
fontstr'default'
extendstr'none'
idstr | NoneNone

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.