Download MetaTrader 5

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

2016.03.07 10:01

The Mandelbrot set - script for MetaTrader 4

| English Español Português Deutsch Русский 日本語

votes: 14

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 Mandelbrot set

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:

Equivolume and range-bars in the strategy tester Equivolume and range-bars in the strategy tester

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 The logarithmic rate of return, or the increment of price logarithms

This indicator can be useful for arbitrageurs.

i-DivergenceBar i-DivergenceBar

The indicator points at the reverse bars based on the Profitunity system by Bill Williams excluding the angulation relative to the Alligator indicator mouth.

UpDown UpDown

The indicator displays the pairs with the current price most/least distant from the opening price.