Functions
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.
Syntax
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
Arguments
series required series bool The condition. Required. The character appears where it holds. title const string The name of the drawing. Const-form. char const string The character to draw. A const string, not a member of a fixed set. Only its first character is used. location input location Which member of the `location` set the character sits at. color series color The character's colour. Series-form. offset input int Shifts the drawing along the chart. Input-form. text const string Text carried alongside the character. Const-form. textcolor series color The colour of that text. Series-form. size input size Which member of the `size` set to draw at. force_overlay const bool Sets this drawing's overlay, separately from the script-wide setting. Return Type
void Example
indicator("PlotChar Example", overlay=true)
conditionUp = close > close[1]
conditionDown = close < close[1]
plotchar(conditionUp, char='▲', location=location.abovebar, size=size.small, color=color.green)
plotchar(conditionDown, char='▼', location=location.belowbar, size=size.small, color=color.red)