Skip to content

plotchar() - Pine Script Function

plotchar() draws a single Unicode character when a condition is true. The function is ideal for lightweight markers such as “↑”, “↓”, or letters that annotate trade setups. Characters can appear above/below bars, on the high/low, or at an exact price level with location.absolute.

Use overlay=true in your indicator() call if you want characters to appear on the price pane. Otherwise they render in the script’s separate panel.

plotchar(series, title, char, location, color, offset, text, textcolor, editable, size, show_last, display, format, precision, force_overlay) → void
NameTypeDescription
seriesseries int/float/boolCondition or value that controls visibility. Non-zero values draw the character.
charconst string (optional)Single-character string to plot (defaults to "•"). Supports Unicode.
locationinput location (optional)Where to place the character (location.abovebar, location.belowbar, location.absolute, etc.).
colorseries color (optional)Character color. Defaults to the chart theme.
offsetsimple int (optional)Shift markers forward/backward by N bars.
textconst string (optional)Tooltip shown on hover.
sizeconst size (optional)Marker size (size.tinysize.huge).

Other arguments (title, textcolor, editable, show_last, display, format, precision, force_overlay) align with plot() defaults.

  • When location.absolute, the numeric value of series sets the price where the character is drawn.
  • If series evaluates to na, the marker is skipped on that bar.
  • Use UTF-8 dingbats (e.g., "✚", "⚠") to create rich visual cues without importing images.
//@version=5
indicator("plotchar() markers", overlay=true, max_labels_count=0)
bullish = ta.crossover(ta.ema(close, 20), ta.ema(close, 50))
bearish = ta.crossunder(ta.ema(close, 20), ta.ema(close, 50))
plotchar(bullish,
title="Bullish flag",
char="▲",
location=location.belowbar,
color=color.new(color.green, 0),
size=size.small,
text="EMA crossover")
plotchar(bearish,
title="Bearish flag",
char="▼",
location=location.abovebar,
color=color.new(color.red, 0),
size=size.small,
text="EMA crossunder")