Discussing the article: "Recurrence Quantification Analysis (RQA) in MQL5: Building a Complete Analysis Library"

 

Check out the new article: Recurrence Quantification Analysis (RQA) in MQL5: Building a Complete Analysis Library.

This article builds a complete Recurrence Quantification Analysis (RQA) toolkit for MetaTrader 5 in pure MQL5. We cover phase-space reconstruction, time-delay embedding, distance and recurrence matrix construction, RQA metric extraction, automatic epsilon selection, and rolling-window computation through a modular library design. The article concludes by applying the library in a practical indicator that plots RR, DET, LAM, ENTR, and TREND directly on the chart, providing a solid foundation for nonlinear time-series analysis in MQL5.

Before we dig into the theory or the code, let us start with the result. The image below shows the RQA indicator running on a live chart in MetaTrader 5. It plots five metrics in a separate window beneath the price chart: Recurrence Rate (RR), Determinism (DET), Laminarity (LAM), Shannon Entropy (ENTR), and Trend.

RQA Indicator EURUSD Example


Each of those lines is computed from a rolling window of price data. At every bar, the library takes a slice of recent closes, constructs a recurrence matrix, counts the patterns inside it, and outputs the metrics. What you see on the chart is the evolution of those metrics over time. Spikes, drops, and sustained levels all carry meaning. But we will not interpret them in this article. For now, the point is this: the library we are about to build produces this output. The rest of the article explains how.

Author: Hammad Dilber