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.

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) → void
ParameterTypeRequiredDescription
seriesseries floatyesThe number the arrow is drawn from. Required. Not a condition.
titleconst stringnoThe name of the drawing. Const-form.
colorupseries colornoThe colour used in one direction. Series-form, so it may differ on every bar.
colordownseries colornoThe colour used in the other direction. Series-form.
offsetinput intnoShifts the drawing along the chart. Input-form, so it is fixed for the run of the script.
minheightinput intnoLower bound on the arrow’s height. Input-form.
maxheightinput intnoUpper bound on the arrow’s height. Input-form.
force_overlayconst boolnoSets this drawing’s overlay, separately from the script-wide setting.

Returns void — void.

indicator("Body size as arrows")
plotarrow(close - open, title = "Body")

See also text and markers

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade