corrections

This commit is contained in:
Miha Kralj
2024-10-13 17:18:31 -07:00
parent 2236f5f483
commit bbefc72d73
65 changed files with 669 additions and 1087 deletions
+3 -2
View File
@@ -1,9 +1,9 @@
//TODO: fails consistency test
namespace QuanTAlib;
// https://efs.kb.esignal.com/hc/en-us/articles/6362791434395-2005-Mar-The-Secret-Behind-The-Filter-MedianAdaptiveFilter-efs
//TODO Fix initial values
public class Maaf : AbstractBase
{
private readonly CircularBuffer _priceBuffer;
@@ -70,6 +70,7 @@ public class Maaf : AbstractBase
double smooth = (_priceBuffer[^1] + (2 * _priceBuffer[^2]) + (2 * _priceBuffer[^3]) + _priceBuffer[^4]) / 6;
_smoothBuffer.Add(smooth, Input.IsNew);
if (_smoothBuffer.Count < _period)
{
return smooth;