Description
The R-Squared (R2) is a technical indicator, which measures how closely a data set fits to the linear regression trendline. When used as a chart study, its values represent the correlation between real data points (close prices) and corresponding linear regression trendline points. In mathematical terms, R-Squared is equal to the square of the Pearson correlation coefficient. For optimization purposes, values of the coefficient may also be smoothed by a simple moving average.
R-Squared values range from 0.0 to 1.0; higher values signify the higher extent of correlation, while those close to 0.0 indicate absence of such correlation.
Input Parameters
Parameter | Description |
---|---|
length
|
The number of bars used in the calculation of the linear regression trendline. |
r average length
|
The length of the moving average to be used when optimization is required. |
Plots
Plot | Description |
---|---|
RSq
|
The R-Squared plot. |
Example*
*For illustrative purposes only. Not a recommendation of a specific security or investment strategy.
Past performance is no guarantee of future performance.