[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
+2 -2
View File
@@ -240,8 +240,8 @@ public sealed class Chandelier : ITValuePublisher
double lowestLow = _minDequeLow.GetExtremum(_lBuf);
// Step 3: Chandelier exits — no second-stage smoothing
ExitLong = highestHigh - _multiplier * atr;
ExitShort = lowestLow + _multiplier * atr;
ExitLong = highestHigh - (_multiplier * atr);
ExitShort = lowestLow + (_multiplier * atr);
_s = s;
+2 -2
View File
@@ -241,8 +241,8 @@ public sealed class Ckstop : ITValuePublisher
double lowestLow = _minDequeLow.GetExtremum(_lBuf);
// Step 2b: First (initial) stops
double initStopShort = highestHigh - _multiplier * atr;
double initStopLong = lowestLow + _multiplier * atr;
double initStopShort = highestHigh - (_multiplier * atr);
double initStopLong = lowestLow + (_multiplier * atr);
// Step 3: Track highest/lowest of initial stops over stopPeriod
int sBufIdx = (int)(_index % _stopPeriod);
+9 -9
View File
@@ -179,15 +179,15 @@ public sealed class Pivotdem : ITValuePublisher
double x;
if (pC < pO)
{
x = pH + 2.0 * pL + pC; // Bearish: weight Low
x = pH + (2.0 * pL) + pC; // Bearish: weight Low
}
else if (pC > pO)
{
x = 2.0 * pH + pL + pC; // Bullish: weight High
x = (2.0 * pH) + pL + pC; // Bullish: weight High
}
else
{
x = pH + pL + 2.0 * pC; // Doji: weight Close
x = pH + pL + (2.0 * pC); // Doji: weight Close
}
double halfX = x * 0.5;
@@ -331,9 +331,9 @@ public sealed class Pivotdem : ITValuePublisher
double pC = close[i - 1];
double x;
if (pC < pO) { x = pH + 2.0 * pL + pC; }
else if (pC > pO) { x = 2.0 * pH + pL + pC; }
else { x = pH + pL + 2.0 * pC; }
if (pC < pO) { x = pH + (2.0 * pL) + pC; }
else if (pC > pO) { x = (2.0 * pH) + pL + pC; }
else { x = pH + pL + (2.0 * pC); }
ppOutput[i] = x * 0.25;
}
@@ -403,9 +403,9 @@ public sealed class Pivotdem : ITValuePublisher
double pC = close[i - 1];
double x;
if (pC < pO) { x = pH + 2.0 * pL + pC; }
else if (pC > pO) { x = 2.0 * pH + pL + pC; }
else { x = pH + pL + 2.0 * pC; }
if (pC < pO) { x = pH + (2.0 * pL) + pC; }
else if (pC > pO) { x = (2.0 * pH) + pL + pC; }
else { x = pH + pL + (2.0 * pC); }
double halfX = x * 0.5;
ppOut[i] = x * 0.25;
+2 -2
View File
@@ -101,7 +101,7 @@ public sealed class Swings : ITValuePublisher
}
_lookback = lookback;
_windowSize = 2 * lookback + 1;
_windowSize = (2 * lookback) + 1;
_hBuf = new double[_windowSize];
_lBuf = new double[_windowSize];
@@ -361,7 +361,7 @@ public sealed class Swings : ITValuePublisher
return;
}
int windowSize = 2 * lookback + 1;
int windowSize = (2 * lookback) + 1;
// Fill warmup bars with NaN
int warmup = Math.Min(windowSize - 1, len);