The Commodity Channel Index (CCI) calculates the deviation of the typical price on each bar from the average price for a certain period of time. Multiplying the mean deviation by 0.015 facilitates normalization, which makes all deviations below the first standard deviation less than -100, and all deviations above the first standard deviation more than 100.
This is an adapted version based on the indicator described by John Ailers in the book “Rocket Science for Traders”. The indicator uses a homodyne discriminator to calculate the dominant cycle.
To apply the homodyne discriminator, the real and imaginary parts must be calculated from the common-mode and quadrature components. (The common-mode and quadrature components are derived using the Hilbert transform. For more information, see the article on the theory and implementation of modern adaptive indicators in the sections on complex numbers and vectors for measuring market cycles, as well as measuring the cycle period. ) For these purposes, the product of the current common-mode component and its value on the previous bar is added to the product of the current quadrature component and its value on the previous bar to get the real part. For the imaginary part, the product of the current quadrature component and the value of the common-mode component on the previous bar is subtracted from the product of the current common-mode component and the value of the quadrature component on the previous bar. Both the real and imaginary part are then smoothed out before the cycle period can be inferred.
[spoiler title=”Read More…”]
The cycle value is used at each closing of the bar as a value representing the number of previous bars needed to build the “Commodity Channel Index” indicator. This gives the indicator adaptability.
The indicator can be used as an alternative to the traditional Commodity Channel Index.
- The limits value regulates the number of bars for which the indicator will be built.
- Cyclepart is a modifier for the calculation period of the cycle, it helps to make sure that the indicator remains in phase with the price data. The indicator can be optimized for the calculated cycle.