plot_shape¶
Warning
This function is not supported on mobile platforms.
- shape_style¶
- Enum Items
shape_style.arrowdown – The shape is drawn as .
shape_style.arrowup – The shape is drawn as .
shape_style.circle – The shape is drawn as .
shape_style.cross – The shape is drawn as .
shape_style.diamond – The shape is drawn as .
shape_style.flag – The shape is drawn as .
shape_style.labeldown – The shape is drawn as .
shape_style.labelup – The shape is drawn as .
shape_style.square – The shape is drawn as .
shape_style.triangledown – The shape is drawn as .
shape_style.triangleup – The shape is drawn as .
shape_style.xcross – The shape is drawn as .
- shape_location¶
- Enum Items
shape_location.abovebar – The shape is plotted above the bar.
shape_location.belowbar – The shape is plotted below the bar.
shape_location.bottom – The shape is plotted near the bottom chart border.
shape_location.top – The shape is plotted near the top chart border.
shape_location.absolute – The shape position is determined by the series.
- shape_size¶
- Enum Items
shape_size.auto – The shape size depends on the bar size.
shape_size.huge – The shape size is constantly huge.
shape_size.large – The shape size is constantly large.
shape_size.normal – The shape size is constantly normal.
shape_size.small – The shape size is constantly small.
shape_size.tiny – The shape size is constantly tiny.
- plot_shape(series[, name][, plot_shape_style][, plot_shape_size][, shape_color][, plot_shape_location][, offset][, text][, text_color])[has-table-overload]¶
- Parameters
series (
series
) – Input series. The values are treated asboolean
, if the plot_shape_style is not shape_location.absolutename (
string
) – The plot name. Default value is series.name.plot_shape_style (
shape_style
) – The style of the shape. Default value is shape_style.xcross.plot_shape_size (
shape_size
.) – The size of the shape. Default value is shape_size.auto.shape_color (
color
) – The color of the shape. Default value is"white"
.plot_shape_location (
shape_location
) – The location of the shape. Default value is shape_location.abovebar.offset (
integer
) – The offset in bars to shift the shape left or right. Default value is 0.text (
string
) – The text to display. Default value is""
text_color (
color
) – The color of the text to display. Default value is"white"
Plots a shape defined by the plot_shape_style. This type of plot is the most useful for the overlay instruments.
Example:
plot_shape { series = close > open }