Plot

plot

Definition: Plots a series of data on the chart.

Syntax: plot(series, title, color, linewidth, type) β†’ void

Returns: A plot object, that can be used in fill.

Arguments:

Name
Type
Description

series

series int/float

Series of data to be plotted. Required argument.

title

const string

Title of the plot.

color

string

Color of the plot. You can use constants like 'color=color.red' or 'color='#ff001a'. Optional argument.

linewidth

simple int

Width of the plotted line. Default value is 1. Not applicable to every style.

type

simple int

Type of plot. Possible values are: 0 (line on the main graph), 1 (line on the output graph). Default value is 0.

Example:

csharpCopy code//@version=5
indicator("plot")
plot(high+low, title='Title', color=color.red, linewidth=2, type=0)
plot(open)
plot(close)

Last updated