Skip to content
All library documents

Recurrence Quantification Analysis for Market Time Series in MQL5

Article MQL5 articles

Summary

The document introduces Recurrence Quantification Analysis (RQA) as a way to measure repeated patterns in time series. It explains time-delay embedding, distance calculations between reconstructed states, and thresholding those distances to form a recurrence matrix. Metrics such as recurrence rate, determinism, laminarity, entropy, and trend are described as numerical summaries of recurrence, line structure, complexity, and possible non-stationarity.

The article presents a modular MQL5 library with fixed and automatic epsilon selection, single-window calculations, rolling analysis, an example script, and an indicator that plots selected metrics. It emphasizes that epsilon and embedding choices affect the results, and that the recurrence matrix grows quadratically with window length, limiting practical window sizes. The toolkit supplies analytical building blocks rather than a trading system; the excerpt does not demonstrate that particular metric readings predict returns or improve strategy performance.

Key ideas

  • RQA reconstructs a time series in a higher-dimensional state space and measures how often states recur.
  • Diagonal and vertical patterns in the recurrence matrix inform metrics such as determinism and laminarity.
  • The epsilon threshold strongly affects recurrence density and therefore the resulting metrics.
  • The MQL5 library supports rolling analysis, but its quadratic computation cost limits window size.
  • RQA metrics are analytical features, not validated trading signals in this article.

Tags

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