The Mandelbrot set is a set of points c on a complex plane, for which the sequence zn, defined by the iterations z0 = 0, z1 = z02 + с, ..., zn+1 = zn2 + c, is finite (i.e. does not go to infinity).
Visually, the Mandelbrot set looks like a set of an infinite number of different shapes, the largest of which is called a cardioid (it looks like a stylized image of a heart and got its name from two Greek words - "heart" and "species"). Cardioid is surrounded by decreasing circles, each of which is surrounded by even smaller circles, etc. to infinity.
At any magnification of this fractal the smaller and smaller image details will be identified, the additional branches with smaller cardioids, circles. And this process is endless.
The algorithm called escape-time can be used for visualizing the image of the Mandelbrot set. Its idea is as follows. It has been proven that the entire set is located within the circle of radius 2 on the plane. Therefore, we assume that for the point c the iteration sequence of the function fc = z2 + c with the initial value z = 0 after a large number of them N (for example, 100) did not go beyond this circle, then the point belongs to the set and is colored in black. Accordingly, if at some number smaller than N, the absolute value of the sequence element becomes greater than 2, then the point does not belong to the set and remains white.
Thus, it is possible to get black and white image of the set, which was obtained by Mandelbrot. To make it a color, it is possible, for example, to paint every point not from the set in color, corresponding to the number of the iteration, on which the sequence has moved beyond the circle.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/13041
The script inserts the FXT-file of any custom chart, synthesized from real tick flow, into the strategy tester folder.The logarithmic rate of return, or the increment of price logarithms
This indicator can be useful for arbitrageurs.