fix: address code review issues in indicators and core components

This commit is contained in:
Miha Kralj
2025-12-09 16:00:04 -05:00
parent 5e6e3a070e
commit c802a9ea80
12 changed files with 54 additions and 26 deletions
+2 -2
View File
@@ -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]);