normalization of methods

This commit is contained in:
Miha Kralj
2026-02-10 21:33:16 -08:00
parent 915d7a007b
commit 6d6259a47d
527 changed files with 10525 additions and 2123 deletions
+1 -1
View File
@@ -307,7 +307,7 @@ public class SsfdspTests
tSeries.Add(new TValue(bar.Time, bar.Close));
}
var batch = Ssfdsp.Calculate(tSeries, period);
var batch = Ssfdsp.Batch(tSeries, period);
// Compare last values
Assert.Equal(batch[^1].Value, streaming.Last.Value, Tolerance);
+1 -1
View File
@@ -292,7 +292,7 @@ public class SsfdspValidationTests
}
// TSeries Calculate
var tsResult = Ssfdsp.Calculate(tSeries, period);
var tsResult = Ssfdsp.Batch(tSeries, period);
// Streaming
var streaming = new Ssfdsp(period);
+8 -1
View File
@@ -229,7 +229,7 @@ public sealed class Ssfdsp : AbstractBase
/// <summary>
/// Calculates SSF-DSP for a time series.
/// </summary>
public static TSeries Calculate(TSeries source, int period = 40)
public static TSeries Batch(TSeries source, int period = 40)
{
var ssfdsp = new Ssfdsp(period);
return ssfdsp.Update(source);
@@ -328,4 +328,11 @@ public sealed class Ssfdsp : AbstractBase
output[i] = ssfFast - ssfSlow;
}
}
public static (TSeries Results, Ssfdsp Indicator) Calculate(TSeries source, int period = 40)
{
var indicator = new Ssfdsp(period);
TSeries results = indicator.Update(source);
return (results, indicator);
}
}