Here is a CCI script that does averages of the CCI with many types to choose from. It also has a few alert types which have titles that are pretty self descriptive. I use the alerts as 'once per bar on close'. Hope it helps you!
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.