MQL4 Reference Custom Indicators SetIndexStyle

SetIndexStyle

Sets the new type, style, width and color for a given indicator line.

void  SetIndexStyle(
   int     index,       // line index
   int     type,        // line type
   int     style=EMPTY// line style
   int     width=EMPTY// line width
   color   clr=clrNONE  // line color
   );

Parameters

index

[in]  Line index. Must lie between 0 and 7.

type

[in]  Shape style. Can be one of Drawing shape styles listed.

style=EMPTY

[in]  Drawing style. It is used for one-pixel thick lines. It can be one of the Drawing shape styles listed. EMPTY value means that the style will not be changed.

width=EMPTY

[in]  Line width. Valid values are: 1,2,3,4,5. EMPTY value means that width will not be changed.

clr=clrNONE

[in]  Line color. Absence of this parameter means that the color will not be changed.

Returned value

None.

Example:

  SetIndexStyle(3,DRAW_LINE,EMPTY,2,clrRed);

See also

Custom Indicator Properties