Lipi Reference
Lipi

Functions

plotarrow()

Draws an arrow on each bar, sized from a number you supply. It is the odd one out among the markers: `plotshape` and `plotchar` take a condition, this takes a value. It also has no location, no shape, no size and no text — where an arrow sits follows from the number.

Syntax

                plotarrow(series float series, const string title, series color colorup, series color colordown, input int offset, input int minheight, input int maxheight, const bool force_overlay, input display display, input string format) → void
              

Arguments

series required series float Series of data to be plotted as arrows. Required argument.
title const string Title of the plot.
colorup series color Color of the up arrows. Optional argument.
colordown series color Color of the down arrows. Optional argument.
offset input int Shifts arrows to the left or to the right on the given number of bars. Default is 0.
minheight input int Maximum possible arrow height in pixels. Default is 100.
maxheight input int Minimal possible arrow height in pixels. Default is 5.
force_overlay const bool If true, the plotted results will display on the main chart pane, even when the script occupies a separate pane. Optional. The default is false.
display input display Controls where the plot is shown (pane, price scale, status line, data window). Use display.* constants; combine with +. Default is display.all.
format input string

Return Type

void

Example


          //@lipi=2
indicator("Plot Arrow Example", overlay=true)
longCondition = talib.crossover(talib.sma(close, 10), talib.sma(close, 20))
shortCondition = talib.crossunder(talib.sma(close, 10), talib.sma(close, 20))
plotarrow(longCondition ? 1 : shortCondition ? -1 : na, title="Arrow Signals", colorup=color.lime, colordown=color.red,offset=-1)