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

A horizontal line from start that stops at the first bar whose range reaches it.

Parameters

NameTypeDefault
pricefloat
startint | Point | NoneNone
untilstr | None'touched'
colorColor | str | NoneNone
widthfloat1.0
dashstr'solid'
idstr | NoneNone

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.