hline
A horizontal level (the first 12 are editable study levels). The result can be used by fill().
#Functions
#hlinefunction
A horizontal level (the first 12 are editable study levels). The result can be used by fill().
hline(price: input float, { title?: const string = "", color?: input color = na, linestyle?: input string = hline.style_solid, linewidth?: input int = 1, editable?: const bool = true, display?: input display = display.all, role?: const string = "", look?: const string = "", variant?: const string = "" }): hline| Parameter | Type | Description |
|---|---|---|
price | input float | The price level. |
title | const stringdefault "" | The name shown in the settings, legend and data window. |
color | input colordefault na | The colour. |
linestyle | input stringdefault hline.style_solid | hline.style_solid, _dashed or _dotted. |
linewidth | input intdefault 1 | Line width in pixels. |
editable | const booldefault true | Accepted and ignored (styles are always editable). |
display | input displaydefault display.all | Where the value is shown (display.*). |
role | const stringdefault "" | What the color of this output means, for the color presets of the Colors tab: "up", "down", "neutral" or "accent". Empty = guessed from the role of its style (look), the theme color, the title and the hue (a teal line counts as up). Another value is error CS2014. |
look | const stringdefault "" | A style made with style.plot / style.line / style.marker / style.fill (its look, shared and user-editable). |
variant | const stringdefault "" | The name of one of the style's variants (style.variant). |
Returns hline.
Example
hline(70, "Overbought", color.muted, hline.style_dotted)Since ChartScript 1
#Constants
| Name | Type | Description |
|---|---|---|
hline.style_dashed | hline_style | hline style: dashed. |
hline.style_dotted | hline_style | hline style: dotted. |
hline.style_solid | hline_style | hline style: solid. |