mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 20:48:04 +00:00
Squash
dotcover s1 .sln s1 s1 s2 s3 s4 s5 s1 s2 x x2 x3 x4 x5 x6 x1 sonarcube cleanup1 sonarcube cleanup2 sonarcube cleanup 3 fixes q q q q q q q q q1 q2 q q1 codacy 1
This commit is contained in:
@@ -6,12 +6,11 @@ namespace QuanTAlib;
|
||||
public class Zlema : AbstractBase
|
||||
{
|
||||
private readonly int _period;
|
||||
private CircularBuffer? _buffer;
|
||||
private double _alpha;
|
||||
private int _lag;
|
||||
private readonly CircularBuffer? _buffer;
|
||||
private readonly double _alpha;
|
||||
private double _lastZLEMA, _p_lastZLEMA;
|
||||
|
||||
public Zlema(int period)
|
||||
public Zlema(int period)
|
||||
{
|
||||
if (period < 1)
|
||||
{
|
||||
@@ -20,8 +19,8 @@ public class Zlema : AbstractBase
|
||||
_period = period;
|
||||
WarmupPeriod = period;
|
||||
_alpha = 2.0 / (_period + 1);
|
||||
_lag = (_period - 1) / 2;
|
||||
Name = $"Zlema({_period})";
|
||||
_buffer = new CircularBuffer(_period);
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -34,7 +33,6 @@ public class Zlema : AbstractBase
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
_buffer = new CircularBuffer(_period);
|
||||
_lastZLEMA = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user