OPEN-SOURCE SCRIPT
CCI PKTELUGUTRADER

The Commodity Channel Index (CCI) is a momentum oscillator that helps traders identify potential buy and sell opportunities by measuring how far the price of a security deviates from its average price over a specific period. It’s widely used for spotting new trends, overbought and oversold conditions, and possible price reversals in various financial markets.
Description of CCI
The CCI calculates the difference between the current price and its historical average price, normalized by mean deviation. Unlike indicators such as RSI, the CCI is an unbounded oscillator, meaning its values can go above +100 or below -100, providing broader insights into momentum shifts in prices.
The formula for CCI is:
CCI
=
Typical Price
−
SMA of Typical Price
0.015
×
Mean Deviation
CCI=
0.015×Mean Deviation
Typical Price−SMA of Typical Price
where:
Typical Price = (High + Low + Close) / 3
SMA is the Simple Moving Average of the Typical Price over the chosen period
Mean Deviation is the average deviation from the SMA.
Buy and Sell Signals
A buy signal is typically generated when the CCI moves above +100, indicating the start of a strong uptrend.
A sell signal occurs when the CCI drops below -100, signaling a strong downtrend.
Many traders close their buy positions when the CCI falls back below +100 and close their sell positions when it rises above -100, or use price action confirmation to validate signals.
Values above +100 suggest overbought conditions, while below -100 indicate oversold; extreme values (like +200 or -200) suggest even stronger momentum.
CCI divergences (price moves not confirmed by the indicator) may indicate potential reversals.
Summary Table: CCI Signals
CCI Level Market Condition Potential Action
Above +100 Overbought/Uptrend Consider Buying
Below -100 Oversold/Downtrend Consider Selling
Back between -100 and +100 Neutral/Indecision Exit or Wait
The CCI is best used alongside other technical indicators for confirmation, as it can generate false signals during sideways markets.
References:
Guide to Commodity Channel Index
What Is CCI?
CCI Trading Strategies
CCI: Technical Indicator
Commodity channel index
Description of CCI
The CCI calculates the difference between the current price and its historical average price, normalized by mean deviation. Unlike indicators such as RSI, the CCI is an unbounded oscillator, meaning its values can go above +100 or below -100, providing broader insights into momentum shifts in prices.
The formula for CCI is:
CCI
=
Typical Price
−
SMA of Typical Price
0.015
×
Mean Deviation
CCI=
0.015×Mean Deviation
Typical Price−SMA of Typical Price
where:
Typical Price = (High + Low + Close) / 3
SMA is the Simple Moving Average of the Typical Price over the chosen period
Mean Deviation is the average deviation from the SMA.
Buy and Sell Signals
A buy signal is typically generated when the CCI moves above +100, indicating the start of a strong uptrend.
A sell signal occurs when the CCI drops below -100, signaling a strong downtrend.
Many traders close their buy positions when the CCI falls back below +100 and close their sell positions when it rises above -100, or use price action confirmation to validate signals.
Values above +100 suggest overbought conditions, while below -100 indicate oversold; extreme values (like +200 or -200) suggest even stronger momentum.
CCI divergences (price moves not confirmed by the indicator) may indicate potential reversals.
Summary Table: CCI Signals
CCI Level Market Condition Potential Action
Above +100 Overbought/Uptrend Consider Buying
Below -100 Oversold/Downtrend Consider Selling
Back between -100 and +100 Neutral/Indecision Exit or Wait
The CCI is best used alongside other technical indicators for confirmation, as it can generate false signals during sideways markets.
References:
Guide to Commodity Channel Index
What Is CCI?
CCI Trading Strategies
CCI: Technical Indicator
Commodity channel index
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.