Oscillator Adaptable_CCI. Along with the calculation price and period, this indicator, unlike the standard one, allows you to change parameters, such as calculation range, correction coefficient, and smoothing method.
It has seven configurable parameters:
- Period (CCI period) – calculation period (as in standard CCI);
- Applied price (CCI apply to) – calculation price (as in standard CCI);
- Deviation period – calculation range;
- Correction factor – correction coefficient (CCI price scale);
- Method – calculation method;
- Overbought – overbought level;
- Oversold – oversold level.
Calculations:
CCI = (Price - mean) / (meandev * Correction factor)
where:
mean = MA(Applied price, Period, Method) meandev = SumD / Deviation period SumD - sum Abs(Applied price - Avg) within Deviation period Avg = SMA(Applied price,Deviation period)
Fig 1. Default values (coincides with standard CCI)
Fig. 2. EMA calculation method
Fig. 3. SMMA calculation method
Fig. 4. LWMA calculation method
Fig. 5. Calculation range of 28 bars