plotchar

The same marker as plotshape, with one character in place of a shape from the fixed set. It draws exactly one character. Pass a longer string and it is cut to the first character, with no warning and no error, so pass the character you want.

plotchar(series bool series, const string title, const string char, input location location, series color color, input int offset, const string text, series color textcolor, input size size, const bool force_overlay) → void
ParameterTypeRequiredDescription
seriesseries boolyesThe condition. Required. The character appears where it holds.
titleconst stringnoThe name of the drawing. Const-form.
charconst stringnoThe character to draw. A const string, not a member of a fixed set. Only its first character is used.
locationinput locationnoWhich member of the location set the character sits at.
colorseries colornoThe character’s colour. Series-form.
offsetinput intnoShifts the drawing along the chart. Input-form.
textconst stringnoText carried alongside the character. Const-form.
textcolorseries colornoThe colour of that text. Series-form.
sizeinput sizenoWhich member of the size set to draw at.
force_overlayconst boolnoSets this drawing’s overlay, separately from the script-wide setting.

Returns void — void.

indicator("Up bars, marked with a character")
plotchar(close > open, title = "Up", char = "u", location = location.belowbar, color = color.green)

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