OskarGallard

Double CCI

OskarGallard Actualizado   
The Commodity Channel Index (CCI) is a momentum oscillator used in technical analysis primarily to identify overbought and oversold levels by measuring an instrument's variations away from its statistical mean. Besides overbought/oversold levels, CCI is often used to find reversals as well as divergences. Originally, the indicator was designed to be used for identifying trends in commodities, however it is now used in a wide range of financial instruments.

There are several steps involved in calculating the CCI. The following example is for a typical 14 Period CCI:

CCI = (Typical Price - 14 Period SMA of TP) / (.015 x Mean Deviation)
Typical Price (TP) = (High + Low + Close)/3
Constant = .015
The Constant is set at .015 for scaling purposes. By including the constant, the majority of CCI values will fall within the 100 to -100 range.

Mean Deviation:
1) Subtract the most recent 14 Period Simple Moving from each typical price (TP) for the Period.
2) Sum these numbers strictly using absolute values.
3) Divide the value generated in step 2 by the total number of Periods (14 in this case).

Overbought and Oversold conditions can be used in their more traditional sense to identify future reversals. Remember true overbought/oversold thresholds values can and often do vary between instruments.

During a Bullish Trend, price crossing above the overbought threshold may indicate strong confidence in the move and price will continue to rise.

During a Bearish Trend, price crossing below the oversold threshold may indicate strong confidence in the move and price will continue to fall.

The first option is a modified CCI indicator that uses the "Arnaud Legoux Moving Average" instead of the SMA, and the source uses the VWAP instead of the HLC3. Added to this version an option to calculate CCI with different types of moving averages:
Green dots mean they are overbought
Orange dots mean they are oversold

Added a "SuperTrend Background" based on the modified CCI indicator:
Bull event = CCI crossing over the 0 line
Bear event = CCI crossing below the 0 line

Added a signal as EMA (modified CCI, signal length)

The second option is a standard CCI indicator that shows a coloured histogram of important levels, giving a good visual of the CCI levels. Added to this version is an extra coloured level +/-200 and an option to use Traditional CCI calculations according to user @JustUncleL

LEVELS:
Aqua: Greater than 200.
Lavender: Greater than 100 and less than 200.
Dark Lavender: Greater than 0 and less than 100.
Dark Coral: Less than 0 and greater than -100.
Coral: Less than -100 and greater than -200.
Light Red: Less than -200.
Notas de prensa:
Migrated to v5.

Code reorganization and improvement.

Added "HLCC4" source.

Added alternate moving average types:
- Zero Lag
- COVWMA: Coefficient of Variation Weighted Moving Average.
- FRAMA: Fractal Adaptive Moving Average.
- Double Weighted Moving Average
- Double Volume-Weighted Moving Average
- Median

Added the crossings of the line 100 and -100 in the form of a diamond.

In the CCI Signal, you can now change the type of moving average.
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?