This indicator provides as output the least square best fit to a set of polynomials of maximum power (degree) using
discrete Legendre polynomials. This is accomplished by decomposing the time series into discrete Legendre polynomials
over the interval of orthogonality given by 2 * Width + 1 and discarding the polynomial fits degrees above some maximum degree.
The remaining smoothed series,
SmoothedSeries[t] = c * 1 + c * (t-Width) + c * Power(t-Width,2) + … c[MaximumDegree]*Power(t-Width,MaximumDegree)
has coefficients given by the array c that are determined such that this polynomial has the minimum least square error over
the interval. The indicator provides two outputs:
ShowLeadingEdge = TRUE
As you move forward along the time series, the fit is generated. What is displayed is the leading, rightmost bar, “”, for
each fit. This is also obtainable via the Savitzky Golay method, see the reference 3 below.
ShowLastFit = TRUE
This displays the entire last fit for just the last bar on the chart, so you will only see an output on the last
2*Width + 1 bars of your chart.