style patterns

This commit is contained in:
Miha Kralj
2026-01-25 16:01:45 -08:00
parent 2836f253c4
commit e59665c8f0
399 changed files with 6892 additions and 1323 deletions
@@ -203,4 +203,4 @@ public class StbandsIndicatorTests
Assert.True(trend == 1 || trend == -1, $"Trend should be +1 or -1, got {trend}");
}
}
}
}
+1 -1
View File
@@ -70,4 +70,4 @@ public class StbandsIndicator : Indicator, IWatchlistIndicator
TrendSeries!.SetValue(stbands.Trend.Value, stbands.IsHot, ShowColdValues);
WidthSeries!.SetValue(stbands.Width.Value, stbands.IsHot, ShowColdValues);
}
}
}
+1 -1
View File
@@ -420,4 +420,4 @@ public class StbandsTests
// Assert
Assert.Equal(stbands.Upper.Value - stbands.Lower.Value, stbands.Width.Value, precision: 10);
}
}
}
@@ -376,4 +376,4 @@ public sealed class StbandsValidationTests : IDisposable
$"Higher multiplier should produce wider bands (mult={multipliers[i]})");
}
}
}
}
+11 -1
View File
@@ -175,11 +175,17 @@ public sealed class Stbands : AbstractBase
// Determine trend
if (close <= finalLower)
{
trend = 1; // Bullish
}
else if (close >= finalUpper)
{
trend = -1; // Bearish
}
else
{
trend = prevTrend;
}
}
// Update state
@@ -374,9 +380,13 @@ public sealed class Stbands : AbstractBase
// Determine trend
if (c <= finalLower)
{
currentTrend = 1;
}
else if (c >= finalUpper)
{
currentTrend = -1;
}
}
upper[i] = finalUpper;
@@ -385,4 +395,4 @@ public sealed class Stbands : AbstractBase
prevClose = c;
}
}
}
}