New article MQL5 Cookbook - Programming sliding channels has been published:
article presents a method of programming the equidistant channel
system. Certain details of building such channels are being considered
here. Channel typification is provided, and a universal type of sliding
channels' method is suggested. Object-oriented programming (OOP) is used
for code implementation.
It is known that the channel is constructed on three points, and each of them has price and time coordinates.
To start with, we will pay attention to the time coordinates, as their
sequence affects the channel type. We will use the channel with a main
line built on two local minimums as an example. A third point will be in
charge of the local maximum. The position of points can be used as criteria for channel typification.
first type refers to a case when minimum appears first, followed by
maximum, and then minimum again. A schematic view of this situation is
presented in Fig.1.
Fig.1 First type of set of points, a scheme
Points that are used for drawing channel's trend lines are usually fractals. This way, a point is simultaneously a fractal and a base for drawing a straight line.
We will now attempt to summarize and code the fractal points with OOP.
2.1 Class of the fractal point
feature of this class involves being in charge of the point that is
among the points used for building the equidistant channel. We will name the indicated class as CFractalPoint, and, in the best traditions of the MQL5 language, we will link it to the CObject interface class with a relation of inheritance.
The class has 4 members for transferring data:
Author: Dennis Kirichenko
To add comments, please log in or register