The v5 and v6 signatures
The v5 documentation lists plotchar(series, title, char, location, color, offset, text, textcolor, editable, size, show_last, display, force_overlay). The current v6 documentation lists plotchar(series, title, char, location, color, offset, text, textcolor, editable, size, show_last, display, format, precision, force_overlay). Both return void. Older examples that stop at display remain useful calls, but do not show every currently documented parameter. Use names for later arguments, especially when migrating a positional force_overlay argument.
| Parameter | Purpose and constraint |
|---|---|
| series | Required bool or numeric series. Use a boolean for conditional markers and a numeric value for location.absolute. |
| title | A const string naming the output in settings and value readouts. |
| char | An input string for the single character, such as "B" or "▲". Use an empty string to hide the glyph. |
| location | abovebar, belowbar, top, bottom, or absolute from the location namespace. |
| color | The glyph color; a series color can change on each bar. |
| offset | Horizontal shift in bars. In v6 it must be simple or weaker, so it cannot vary by bar. |
| text | A const string for accompanying text. It cannot contain a changing price or input.string() value. |
| textcolor | The accompanying text color; it may vary by bar. |
| editable | Whether users can edit the output style in the settings. |
| size | The character size, using size.auto, tiny, small, normal, large, or huge. |
| show_last | An input integer restricting output to the most recent number of bars. |
| display | Output destinations such as display.pane, display.data_window, display.status_line, display.all, or display.none. |
| format and precision | Current v6 parameters controlling numeric value formatting, rather than character content. |
| force_overlay | When true, places the visual on the main chart even when the script occupies another pane. |
//@version=5
indicator("plotchar arguments", overlay = true)
average = ta.sma(close, 20)
crossedAbove = ta.crossover(close, average)
confirmedCross = crossedAbove and barstate.isconfirmed
plotchar(confirmedCross, "Positional marker", "B", location.belowbar, color.teal)
plotchar(series = confirmedCross, title = "Named marker", char = "▲", location = location.abovebar, color = color.teal, text = "CROSS", textcolor = color.teal)
plot(average, "SMA", color = color.gray)