Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

votes: 15
2011.04.11 17:15
2016.11.22 07:32

The indicator plots the Zigzag ("saw") using the High and Low prices.

The DRAW_ZIGZAG drawing style allow to draw sections using the values of two indicator buffers. It looks like DRAW_SECTION, but it allows to draw vertical sections inside one bar. The color, width and style of Zigzag lines changed randomly after N ticks. The N variable is defined as input parameter, it can be changed using the "Properties" window.

Note that initial properties of the plot1 graphic plot (DRAW_ZIGZAG) are defined using the #property preprocessor directive, further these properties changed randomly (OnCalculate() function).

See also: The Drawing Styles in MQL5.


Translated from Russian by MetaQuotes Software Corp.
Original code:


The DRAW_BARS drawing style is used to plot the bars using the values of 4 indicator buffers with Open, High, Low and Close prices.


The DRAW_FILLING drawing style plots the filled area between the values of two indicator buffers. In fact, it plots two lines and fills the area between them with the specified color.


The DRAW_ARROW drawing style plots the arrows (chars).

Creating fractals in MQL5 using the Iterated Function Systems (IFS) Creating fractals in MQL5 using the Iterated Function Systems (IFS)

The cIntBMP library provides the creation of graphic BMP images. We will consider the example of its use in creation of self-similar fractal sets using the Iterated Function System (IFS).