OBV, TRIMA

This commit is contained in:
Miha Kralj
2022-11-11 21:15:18 -08:00
parent 3fb447f4c1
commit f6c82ff151
29 changed files with 507 additions and 331 deletions
+4 -1
View File
@@ -22,7 +22,10 @@ public class MAX_Series : Single_TSeries_Indicator
double _max = TValue.v;
for (int i = 0; i < this._buffer.Count; i++)
{ _max = (this._buffer[i] > _max) ? this._buffer[i] : _max; }
{
//_max = (this._buffer[i] > _max) ? this._buffer[i] : _max;
_max = Math.Max(this._buffer[i], _max);
}
var result = (TValue.t, this.Count < this._p - 1 && this._NaN ? double.NaN : _max);
+4 -1
View File
@@ -22,7 +22,10 @@ public class MIN_Series : Single_TSeries_Indicator
double _min = TValue.v;
for (int i = 0; i < this._buffer.Count; i++)
{ _min = (this._buffer[i] < _min) ? this._buffer[i] : _min; }
{
//_min = (this._buffer[i] < _min) ? this._buffer[i] : _min;
_min = Math.Min(this._buffer[i], _min);
}
var result = (TValue.t, (this.Count < this._p - 1 && this._NaN) ? double.NaN : _min);