Related Candles - MetaTrader 5 Script | Forex Indicator Downloads - MT4/MT5 Resources - MetaTrader 5 Resources

Indicator that combines the ranked (automatic) correlations of 4 prices into one indicator.
The indicator uses not just one price, but the standard 4 prices: open, close, high and low, calculates its (automatic) correlation ranking and combines these results into one indicator. The color of the candle (the "trend") is determined based on the correlation between the opening price and the closing price. The rest (highest and lowest) are good indicators of current volatility - whether there is volatility or not.
The correlation types supported by this indicator are Spearman and Pearson correlations. Although they are similar, the differences can be significant and some experimentation is recommended to find the type that suits a particular trading style. The default calculation length is set for fairly "trend-oriented" usage. To use it for momentum (fast) responses, set the period to a shorter value.

Unlike classic rank correlation - in this metric, "rank" has a different meaning than when correlation is applied to independent data sets (price, value, etc.). In this case it is more like "trend direction" or "momentum class" and should be used as such.
Attachment download
📎correlation_candles.mq5 (9.82 KB)
Source: MQL5 #17130
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •