[CodeFactor] Apply fixes to commit 9697fac

This commit is contained in:
codefactor-io
2026-03-14 05:03:08 +00:00
parent 9697facfb4
commit e35ff7fa3f
164 changed files with 458 additions and 530 deletions
-1
View File
@@ -126,7 +126,6 @@ public sealed class Adl : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -139,7 +139,6 @@ public sealed class Adosc : ITValuePublisher
// EMA compensator threshold (same as in Ema.cs)
private const double COMPENSATOR_THRESHOLD = 1e-10;
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -256,7 +256,6 @@ public sealed class Aobv : ITValuePublisher
return (new TSeries(tFast, vFast), new TSeries(tSlow, vSlow));
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -174,7 +174,6 @@ public sealed class Cmf : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-2
View File
@@ -87,7 +87,6 @@ public sealed class Efi : ITValuePublisher
_ps = _s;
}
/// <summary>
/// Resets the indicator state.
/// </summary>
@@ -225,7 +224,6 @@ public sealed class Efi : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -201,7 +201,6 @@ public sealed class Eom : ITValuePublisher
Last = default;
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -112,7 +112,6 @@ public sealed class Evwma : ITValuePublisher
return lastValid;
}
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
public TValue Update(TBar input, bool isNew = true)
{
+2 -3
View File
@@ -92,7 +92,7 @@ public sealed class Iii : ITValuePublisher
// Calculate position multiplier: where close falls in the range
// +1 when close = high, -1 when close = low, 0 when close = midpoint
double positionMultiplier = range > 0 ? (2.0 * close - high - low) / range : 0.0;
double positionMultiplier = range > 0 ? ((2.0 * close) - high - low) / range : 0.0;
// Calculate raw III
double rawIii = positionMultiplier * volume;
@@ -204,7 +204,6 @@ public sealed class Iii : ITValuePublisher
Last = default;
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
@@ -309,7 +308,7 @@ public sealed class Iii : ITValuePublisher
{
double range = high[i] - low[i];
double vol = Math.Max(volume[i], 1.0);
double positionMultiplier = range > 0 ? (2.0 * close[i] - high[i] - low[i]) / range : 0.0;
double positionMultiplier = range > 0 ? ((2.0 * close[i]) - high[i] - low[i]) / range : 0.0;
rawIii[i] = positionMultiplier * vol;
if (!double.IsFinite(rawIii[i]))
+2 -3
View File
@@ -145,7 +145,7 @@ public sealed class Kvo : ITValuePublisher
double cm = 0.0;
if (range > 0)
{
cm = Math.Abs(2.0 * ((range - (close - low)) / range) - 1.0);
cm = Math.Abs((2.0 * ((range - (close - low)) / range)) - 1.0);
}
// Calculate direction multiplier (DM)
@@ -295,7 +295,6 @@ public sealed class Kvo : ITValuePublisher
Signal = default;
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
@@ -440,7 +439,7 @@ public sealed class Kvo : ITValuePublisher
// Calculate CM
double range = h - l;
double cm = range > 0 ? Math.Abs(2.0 * ((range - (c - l)) / range) - 1.0) : 0.0;
double cm = range > 0 ? Math.Abs((2.0 * ((range - (c - l)) / range)) - 1.0) : 0.0;
// Calculate DM
double dm = trend * vol * cm;
-1
View File
@@ -212,7 +212,6 @@ public sealed class Mfi : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -181,7 +181,6 @@ public sealed class Nvi : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -175,7 +175,6 @@ public sealed class Obv : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -250,7 +250,6 @@ public sealed class Pvd : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -188,7 +188,6 @@ public sealed class Pvi : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -260,7 +260,6 @@ public sealed class Pvo : ITValuePublisher
Histogram = default;
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -169,7 +169,6 @@ public sealed class Pvr : ITValuePublisher
IsHot = false;
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -230,7 +230,6 @@ public sealed class Pvt : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -207,7 +207,6 @@ public sealed class Tvi : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -212,7 +212,6 @@ public sealed class Twap : ITValuePublisher
return result;
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -173,7 +173,6 @@ public sealed class Va : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -190,7 +190,6 @@ public sealed class Vf : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -265,7 +265,6 @@ public sealed class Vo : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -205,7 +205,6 @@ public sealed class Vroc : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -223,7 +223,6 @@ public sealed class Vwad : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -214,7 +214,6 @@ public sealed class Vwap : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>
-1
View File
@@ -164,7 +164,6 @@ public sealed class Wad : ITValuePublisher
return new TSeries(t, v);
}
/// <summary>
/// Initializes the indicator state using the provided bar series history.
/// </summary>