# Double CCI

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.
เอกสารเผยแพร่: Migrated to v5.

Code reorganization and improvement.

- 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.
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎของบ้าน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?