Average CCI - Floating Levels - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources

The Commodity Channel Index ( CCI ) is an oscillator originally proposed by Donald Lambert in 1980.
CCI measures a security's change relative to a statistical mean. CCI is calculated as the difference between the typical price of the commodity and its simple moving average divided by the absolute deviation of the average typical price. The index is usually scaled by the reciprocal of 0.015 to provide a more readable number. For scaling purposes, Lambert set the constant to 0.015 to ensure that approximately 70% to 80% of CCI values would fall between −100 and +100.
Sometimes CCI is "tense" - if you use it based on horizontal crossovers it can produce a lot of false signals. One of the possible approaches is to pre-filter the price calculation before using it in the CCI (this would significantly reduce the delay and then smooth out the already calculated CCI). This version does this: use pre-filtered CCI calculated prices. You can use the common set of average types:
Additionally, the CCI fluctuates around zero. A quantity whose percent CCI value falls between +100 and −100 depends on the number of periods used by the quantity. The shorter the CCI, the less volatile the CCI is as a percentage of values between +100 and −100. Conversely, the more periods used to calculate the CCI, the higher the percentage of values between +100 and −100. But to avoid constant period adjustments to keep these values within "predictable" range/level boundaries, this version adds floating levels. That, as usual. Make CCI also implicitly adaptive
You can use color changes as signals

Attachment download
📎cci_of_average_1flh.mq5 (14.69 KB)
Source: MQL5 #23367
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •