17 using System.Collections.Generic;
61 : base(name, targetSymbol, referenceSymbol, period)
66 throw new ArgumentException($
"Period parameter for Correlation indicator must be greater than 2 but was {period}");
68 _correlationType = correlationType;
80 : this($
"Correlation({period})", targetSymbol, referenceSymbol, period, correlationType)
92 var newCorrelation = 0d;
95 newCorrelation = MathNet.Numerics.Statistics.Correlation.Pearson(targetDataPoints, referenceDataPoints);
99 newCorrelation = MathNet.Numerics.Statistics.Correlation.Spearman(targetDataPoints, referenceDataPoints);
101 if (newCorrelation.IsNaNOrZero())