You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.
Author: MetaQuotes