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
+7 -2
View File
@@ -33,7 +33,9 @@ public sealed class Adr : AbstractBase
public Adr(int period, AdrMethod method = AdrMethod.Sma)
{
if (period <= 0)
{
throw new ArgumentException("Period must be greater than 0", nameof(period));
}
_ma = method switch
{
@@ -137,7 +139,10 @@ public sealed class Adr : AbstractBase
/// </summary>
public TSeries Update(TBarSeries source)
{
if (source.Count == 0) return [];
if (source.Count == 0)
{
return [];
}
// Calculate range series
TSeries rangeSeries = CalculateRanges(source);
@@ -223,4 +228,4 @@ public enum AdrMethod
Ema = 2,
/// <summary>Weighted Moving Average</summary>
Wma = 3
}
}