level
forge.drawfunctionSince Forge API 1
Signaturepython
forge.draw.level(price: float,*,start: int | Point | None = None,until: str | None = 'touched',color: Color | str | None = None,width: float = 1.0,dash: str = 'solid',id: str | None = None) -> DrawingA horizontal line from start that stops at the first bar whose range reaches it.
Parameters
| Name | Type | Default |
|---|---|---|
| price | float | |
| start | int | Point | None | None |
| until | str | None | 'touched' |
| color | Color | str | None | None |
| width | float | 1.0 |
| dash | str | 'solid' |
| id | str | None | None |
until="touched" compares the level with each bar's high and low, so it is for levels at
a price: an indicator on the price chart or one whose values are prices. until=None
keeps the line going. start defaults to the current bar inside on_bar.