mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 18:48:05 +00:00
corrections
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user