Skip to content
All library documents

Using Spearman and Pearson Rank Correlation in a Price Indicator

Article MQL5 code base

Summary

The document describes a rank autocorrelation indicator that offers both Spearman rank correlation and Pearson correlation. It can be calculated using a choice of 22 price types, and its overbought and oversold reference levels can be set as floating or fixed levels. The description presents these as configuration options rather than specifying a trading system or entry and exit rules.

Both correlation measures are described as ranging from negative one to positive one: positive one denotes perfectly aligned changes, zero indicates no correlation, and negative one denotes perfectly opposite changes. These values explain the scale of the indicator, but the document gives no chart examples, validation, performance results, or guidance on selecting a lookback period or interpreting threshold crossings. Correlation readings alone do not establish a forecast or a profitable signal, and the material does not explain how the two correlation methods differ in practical use. Traders would need to define and test any application themselves.

Key ideas

  • The indicator includes Spearman rank correlation and Pearson correlation.
  • It supports a choice among 22 price types and fixed or floating reference levels.
  • Correlation values run from negative one for perfect inverse movement to positive one for perfect aligned movement.
  • The description does not provide trading rules, empirical evidence, or guidance for interpreting specific readings.

Tags

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