Style modifiers

Modifiers are bare words appended after an expression, separated by commas. They change how the series or the draw call is rendered. Several can be combined.

ModifierEffect
COLORRED, COLORYELLOW, …Preset colour, see the colour table below.
COLORBBGGRRCustom colour by hex, in blue-green-red byte order. COLOR00FFFF is yellow.
RGBXRRGGBBCustom colour by hex in the familiar red-green-blue order.
LINETHICK1 … LINETHICK5Line width in pixels.
DOTLINEDraw the line dashed.
STEPLINEDraw the line as a step function.
STICKDraw as vertical bars from zero instead of a line.
LINESTICKDraw both the bars and the line.
COLORSTICKHistogram coloured by sign — the classic MACD bar. Combine with UPCOLOR / DOWNCOLOR.
VOLSTICKVolume-style coloured bars; accepts STICKTYPE.
LINEAREAFill the area between the line and the axis.
POINTDOT / CIRCLEDOTDraw points instead of a connected line.
UPDOWNDOTPoints coloured by direction; uses UPCOLOR / DOWNCOLOR.
SINGLELINETreat the series as isolated segments rather than one polyline.
LINEOVERLAYDraw on the main pane even from a sub-pane script.
NODRAWCompute the output but do not draw it.
NOTEXT, NOTITLEKeep the drawing but hide the name in the legend.
EXDATAExtended data — available to alerts and scans, never drawn.
DRAWABOVE / DRAWCENTER / DRAWBELOWPlace text and numbers above, on, or below the anchor price.
ALIGN0 / ALIGN1 / ALIGN2Horizontal text alignment: left, centre, right.
VALIGN0 / VALIGN1 / VALIGN2Vertical text alignment: top, middle, bottom.
FONTSIZE8 … FONTSIZE24Font size in pixels for text and numbers.

Some modifiers are function calls rather than bare words: RGB(r,g,b) and RGBA(r,g,b,a) set an arbitrary colour, UPCOLOR() / DOWNCOLOR() set the two-sided colours, CSSFONT() sets a full CSS font string, XMOVE() / YMOVE() shift the drawing in pixels, LINEDASH() sets a dash pattern, BACKGROUND() adds a text background box and CKLINE() adds a connector line.

Modifiers in use
MACD: (DIF - DEA) * 2, COLORSTICK, UPCOLOR(RGB(38,166,120)), DOWNCOLOR(RGB(239,83,80));
DRAWTEXT(CROSS(K, D), LOW, 'buy'), COLORWHITE, FONTSIZE12, VALIGN2, YMOVE(6),
         BACKGROUND(RGB(38,166,120), RGB(255,255,255));