Skip to content
All library documents

Using DBSCAN Clustering in MQL5 Expert Advisor Signals

Article MQL5 articles

Summary

This article introduces DBSCAN as a way to cluster data for MQL5 Expert Advisor signal logic. Unlike k-means and agglomerative approaches that require a chosen cluster count, DBSCAN uses a neighborhood distance parameter and a minimum number of points to identify dense groups and label other observations as noise. The author explains the distinction with non-trading examples and notes that density-based groups can have irregular shapes and may reveal structure without a preset number of clusters.

The proposed application is to build Expert Signal classes that process different datasets, potentially including prices or indicator values, to inform buy and sell decisions. The article situates this work within the MQL5 Wizard framework and suggests clustering may also help with data normalization and outlier handling. It presents the concepts as preliminary exploration rather than a live-ready trading method. Results depend on the chosen features, distance scaling, neighborhood threshold, and minimum-points setting; the article does not establish a profitable strategy or provide robust out-of-sample validation.

Key ideas

  • DBSCAN discovers dense groups without requiring the user to specify a cluster count in advance.
  • Its neighborhood distance and minimum-points inputs affect cluster formation and noise classification.
  • Density-based clustering can represent irregularly shaped groups that partitioning methods may not capture.
  • MQL5 Expert Signal classes can use clustered prices or indicators as inputs to trading decisions.
  • The proposed signal use is exploratory and requires independent testing before live deployment.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.