hline

hline(source[, name, color, line_width, offset, plot_style, show_label])[has-table-overload]
Parameters
  • source (series or numeric) – Input series or a value.

  • name (string) – Name of the plot. Default value is "hline(source)".

  • color (color) – Line color. Default value is "white".

  • line_width (integer) – Line width. Default value is 1.

  • offset (integer) – Offset in bars (not yet handled by the engine). Default value is 0.

  • plot_style (plot_style) – Plot style. One of style.solid_line, style.dashed_line. Not yet handled by the engine. Default value is style.solid_line.

  • show_label (boolean) – Contols, if the label with value is shown for this line. Default value is true.

Plots a horizontal line throughout the whole instrument plot area through the latest value in the source.

overbought = input(80, "Overbought")
hline (overbought, "Overbought", "red")