mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 12:38:06 +00:00
fix: address code review issues in indicators and core components
This commit is contained in:
@@ -252,6 +252,8 @@ public sealed class Lsma : ITValuePublisher
|
||||
int windowSize = Math.Min(len, _period);
|
||||
int startIndex = len - windowSize;
|
||||
|
||||
Reset();
|
||||
|
||||
// Initialize lastValidValue
|
||||
if (startIndex > 0)
|
||||
{
|
||||
@@ -269,8 +271,6 @@ public sealed class Lsma : ITValuePublisher
|
||||
_lastValidValue = 0;
|
||||
}
|
||||
|
||||
Reset();
|
||||
|
||||
for (int i = startIndex; i < len; i++)
|
||||
{
|
||||
double val = GetValidValue(source.Values[i]);
|
||||
|
||||
Reference in New Issue
Block a user