rect

rect(first, second[, name][, color][, width])[has-table-overload]
Parameters
  • first (series or numeric) – First series.

  • second (series or numeric) – Second series.

  • name (string) – Plot name. Default name is "rect(first, second)"

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

  • width (numeric) – The width of the rectangle relative to the bar size. Default value is 1.

Plots a rectangle with the given width and values defined by the first and last.

Example:

rect {
    first = 0,
    second = ao,
    color = ao >= ao[1] and up_color or down_color,
    width = 0.8
}