mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-05 20:47:43 +00:00
Sonarcloud changes
This commit is contained in:
@@ -26,7 +26,7 @@ public class ATR_Series : Single_TBars_Indicator
|
||||
this._k = 1.0 / (double)(this._p);
|
||||
this._k1m = 1.0 - this._k;
|
||||
this._lastema = this._lastlastema = double.NaN;
|
||||
if (_bars.Count > 0) { base.Add(_bars); }
|
||||
if (this._bars.Count > 0) { base.Add(this._bars); }
|
||||
}
|
||||
|
||||
public override void Add((DateTime t, double o, double h, double l, double c, double v) TBar, bool update = false)
|
||||
@@ -36,7 +36,7 @@ public class ATR_Series : Single_TBars_Indicator
|
||||
this._cm1 = this._lastcm1;
|
||||
}
|
||||
|
||||
if (_cm1 is double.NaN) { _cm1 = TBar.c; }
|
||||
if (this._cm1 is double.NaN) { this._cm1 = TBar.c; }
|
||||
double d1 = Math.Abs(TBar.h - TBar.l);
|
||||
double d2 = Math.Abs(_cm1 - TBar.h);
|
||||
double d3 = Math.Abs(_cm1 - TBar.l);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace QuanTAlib;
|
||||
namespace QuanTAlib;
|
||||
using System;
|
||||
|
||||
/* <summary>
|
||||
|
||||
Reference in New Issue
Block a user