LINREG bug fix

This commit is contained in:
Miha Kralj
2022-11-14 21:42:13 -08:00
parent 39bb7b8a91
commit 7536c3a3e0
2 changed files with 7 additions and 5 deletions
+6 -3
View File
@@ -21,14 +21,17 @@ Sources:
public class LINREG_Series : Single_TSeries_Indicator
{
public readonly TSeries Intercept = new();
public readonly TSeries RSquared = new();
public readonly TSeries StdDev = new();
public TSeries Intercept { get; }
public TSeries RSquared { get; }
public TSeries StdDev { get; }
private readonly System.Collections.Generic.List<double> _buffer = new();
public LINREG_Series(TSeries source, int period, bool useNaN = false)
: base(source, period, useNaN)
{
this.Intercept = new();
this.RSquared = new();
this.StdDev = new();
if (this._data.Count > 0) { base.Add(this._data); }
}