Functions
hline()
Renders a horizontal line at a given fixed price level.
Syntax
hline(input float price, const string title, input color color, input int linewidth, input hlineStyle style) → series hline
Arguments
price required input float Price value at which the object will be rendered. Required argument. title const string Title of the object. color input color Color of the rendered line. Must be a constant value (not an expression). Optional argument. linewidth input int Width of the rendered line. Default value is 1. style input hlineStyle Style of the rendered line. Possible values are: hlineStyle.solid, hlineStyle.dotted, hlineStyle.dashed. Optional argument. Return Type
series hline Example
indicator("Horizontal Line Example", overlay=true)
// Draw a horizontal line at 4000
hline(4000, "Support Level", color=color.blue, linewidth=2, style=hlineStyle.dashed)