mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-19 11:08:05 +00:00
Code Quality
This commit is contained in:
@@ -33,7 +33,6 @@ public class TEMA_Series : Single_TSeries_Indicator
|
||||
|
||||
public override void Add((DateTime t, double v) TValue, bool update)
|
||||
{
|
||||
|
||||
if (update)
|
||||
{
|
||||
this._lastema1 = this._lastlastema1;
|
||||
@@ -59,12 +58,12 @@ public class TEMA_Series : Single_TSeries_Indicator
|
||||
}
|
||||
else
|
||||
{
|
||||
_ema1 = TValue.v * this._k + this._lastema1 * this._k1m;
|
||||
_ema2 = _ema1 * this._k + this._lastema2 * this._k1m;
|
||||
_ema3 = _ema2 * this._k + this._lastema3 * this._k1m;
|
||||
_ema1 = (TValue.v * this._k) + (this._lastema1 * this._k1m);
|
||||
_ema2 = (_ema1 * this._k) + (this._lastema2 * this._k1m);
|
||||
_ema3 = (_ema2 * this._k) + (this._lastema3 * this._k1m);
|
||||
}
|
||||
|
||||
double _tema = 3 * (_ema1 - _ema2) + _ema3;
|
||||
double _tema = (3 * (_ema1 - _ema2)) + _ema3;
|
||||
|
||||
this._lastlastema1 = this._lastema1;
|
||||
this._lastlastema2 = this._lastema2;
|
||||
|
||||
Reference in New Issue
Block a user