Indicators: DRAW_COLOR_ZIGZAG

 

DRAW_COLOR_ZIGZAG:

The DRAW_COLOR_ZIGZAG style draws lines of different colors by values ​​of two indicator buffers. This is the color version of the DRAW_ZIGZAG style and allows you to specify individual color for each line from predefined color set. 

The color, thickness and style of zigzag lines are changed randomly every N ticks. Note, that initially there are 8 colors set for the plot1 graphical plotting (with the DRAW_COLOR_ZIGZAG style) using the #property compiler directive. Then, in the OnCalculate() function the color is chosen at random from 14 colors stored in the colors[] array. The N parameter of indicator is made as external so that you can adjust it manually (the Inputs tab of indicator properties dialog box).

See also The Drawing Styles in MQL5 article.

DRAW_COLOR_ZIGZAG

Author: MetaQuotes


Reason: