We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a89f51f commit 0bc2086Copy full SHA for 0bc2086
src/TALib.NETCore/Functions/TA_Cci.cs
@@ -198,9 +198,8 @@ private static Core.RetCode CciImpl<T>(
198
var tempReal2 = CalcSummation(circBuffer, theAverage);
199
200
var tempReal = lastValue - theAverage;
201
- outReal[outIdx++] = !T.IsZero(tempReal) && !T.IsZero(tempReal2)
202
- ? tempReal / (tPointZeroOneFive * (tempReal2 / timePeriod))
203
- : T.Zero;
+ var denominator = tPointZeroOneFive * (tempReal2 / timePeriod);
+ outReal[outIdx++] = !T.IsZero(tempReal) && !T.IsZero(denominator) ? tempReal / denominator : T.Zero;
204
205
// Move forward the circular buffer indexes.
206
if (circBufferIdx > maxIdxCircBuffer)
0 commit comments