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
Check out the new article: Mapping the Shape of Price: The Mapper Lens and Cover in MQL5.
The article introduces the Mapper pipeline in MQL5 by implementing the two fundamental components: CTDAMapperFilter (lens) and CTDAMapperCover (overlapping intervals). It explains three lens options—eccentricity, density, and coordinate—plus cover parameters (resolution and gain), and demonstrates how a price point cloud is reduced to one value per point and interval memberships. Readers obtain ready inputs for subsequent clustering and graph construction.
Earlier in this series, we embedded a price series into a point cloud and summarized its shape with a persistence diagram. A diagram is a precise object. It is also an abstract one. It tells you a loop exists and how strong it is, but it does not draw you a picture of the cloud you can point at and read.
The Mapper algorithm gives you that picture. It takes the same point cloud and compresses it into a small graph: a handful of nodes joined by edges. A round cloud becomes a ring of nodes. A branching cloud becomes a tree. A cloud in two separated pieces becomes two disconnected clusters. You look at the graph and you see the structure directly.
For a trader, the appeal is direct. A persistence diagram answers a yes-or-no question about whether structure is present. A Mapper graph shows you that structure itself, laid out as a shape you can compare from one window to the next: a clean ring reads differently at a glance from a fragmented chain or two disconnected pieces. That picture is a lossy compression, though, and its quality depends entirely on a few choices made at the very start: which one-dimensional summary of the cloud to use, how finely to slice it, and how much the slices overlap. Choose them well and the graph reveals real structure. Choose them badly and no clustering later can recover it. Getting those choices right, and checking that they are right, is the subject of this article.
So this article deliberately stops before the graph. It builds no node and no edge. Its goal is narrow and testable: produce the two artifacts the graph step will need, and hand you simple checks that confirm they are correct before you go further. The first artifact is a lens, one scalar value f[i] for every point, together with the minimum, maximum, and range of those values. The second is a cover, a set of evenly spaced overlapping intervals that slice the lens range, each carrying the list of point indices that fall inside it. Both are built on two objects from earlier in the series, a point cloud and its pairwise distance matrix, covered in an earlier article. We reuse those two classes here without rebuilding them. The intrinsic lenses read the whole distance matrix and so cost order N squared, but they only read distances already computed, never recompute them. The coordinate lens is cheaper and depends on the frame you pick.
Author: Hammad Dilber