Refactor code formatting and improve consistency across various test files

- Removed unnecessary blank lines in multiple test files to enhance readability.
- Ensured consistent spacing and formatting in the `Trima`, `Usf`, `Vidya`, `Wma`, and `Atr` test classes.
- Updated comments for clarity and consistency in the `Atr` and `Adl` classes.
- Adjusted project files for better structure and maintainability.
This commit is contained in:
Miha Kralj
2025-12-28 17:44:08 -08:00
parent ad6eebf812
commit 13d7c1215d
169 changed files with 10815 additions and 10814 deletions
+7 -7
View File
@@ -35,7 +35,7 @@ public class HtitTests
var series = data;
var resultSeries = htit.Update(series);
// Reset and calculate streaming
htit.Reset();
var streamingResults = new List<double>();
@@ -58,10 +58,10 @@ public class HtitTests
var series = data;
var resultSeries = htit.Update(series);
var spanInput = data.Values.ToArray();
var spanOutput = new double[spanInput.Length];
Htit.Calculate(spanInput, spanOutput);
for (int i = 0; i < resultSeries.Count; i++)
@@ -76,7 +76,7 @@ public class HtitTests
var htit = new Htit();
htit.Update(new TValue(DateTime.UtcNow.Ticks, 100.0));
htit.Update(new TValue(DateTime.UtcNow.Ticks, double.NaN));
Assert.Equal(100.0, htit.Last.Value);
}
@@ -94,9 +94,9 @@ public class HtitTests
var htit = new Htit();
htit.Update(new TValue(DateTime.UtcNow, 100));
htit.Update(new TValue(DateTime.UtcNow, 110));
htit.Reset();
Assert.True(double.IsNaN(htit.Last.Value));
Assert.False(htit.IsHot);
}
@@ -163,7 +163,7 @@ public class HtitTests
var gbm = new GBM(startPrice: 100, mu: 0.05, sigma: 0.2, seed: 123);
var bars = gbm.Fetch(1000, DateTime.UtcNow.Ticks, TimeSpan.FromMinutes(1));
var series = bars.Close;
// 1. Batch Mode
var batchSeries = Htit.Batch(series);
double expected = batchSeries.Last.Value;
+1 -1
View File
@@ -106,7 +106,7 @@ public sealed class HtitValidationTests : IDisposable
// Calculate QuanTAlib HTIT Streaming
var htit = new Htit();
var streamingResults = new List<double>();
foreach (var item in _data.Data)
{
streamingResults.Add(htit.Update(item).Value);
+1 -1
View File
@@ -310,7 +310,7 @@ public sealed class Htit : AbstractBase
for (int i = 0; i < source.Length; i++)
{
double price = source[i];
// Handle non-finite input: skip processing if no valid price seen yet
if (!double.IsFinite(price))
{