I was checking the formula of built-in "cci" function and decided to publish a more customizable version of the Commodity Channel Index, so you can play with levels and a bunch of different sources.
If someone doesn't know what is this: This indicator was originally developed by Donald R. Lambert ("Commodities" magazine, 1980) to identify cyclical or seasonal price patterns in commodities. Now it is applied not only to commodities but to market indices, stocks and Forex.
This script is published closed-source and you may privately use it freely.
Want to use this script on a chart?
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.