Crucial Changes with new PineScript version=6
Added Statistics Table:
Displays CCI Max and CCI Min over the last 100 bars.
Values are rounded to two decimals, with customizable colors and font styles.
Enhanced Visual Elements:
Added dashed horizontal lines for overbought (100) and oversold (-100) levels.
Dynamic trendline color: green (positive) and red (negative).
Alert System:
Alerts trigger when CCI crosses 100 or -100, notifying users of potential trade setups.
Some code organization:
Inputs, calculations, visuals, alerts, and the statistics table are now clearly separated.
Variables renamed for clarity (e.g., cciValue, upperBand, lowerBand).
Backward Compatibility:
Core functionality (CCI calculation and trendline plotting) remains unchanged.