Center and smoothing
The center is the reference for price; smoothing is processing applied to the value after calculation.
Smooths the difference between price and a center line divided by the deviation, and shows it as a blue line and positive/negative bars. The center method and the later smoothing method can be chosen separately.
The blue line and the bars are the same valueGreen is 0 or more, red is below 0. It is not a color-coding for rising and falling.
Gray is unsmoothedAdded with Show Unsmoothed CCI. With None it is not drawn because it would duplicate the main line.
±100 is not a limitThe vertical axis is automatic, and values also go outside ±100.
Compares the default settings and a settings change example on a screen with only this product applied.
Published example: M1. This is an example to explain the display. The example with changed settings is not a set of recommended values. Details can be checked in the actual-size view. Also check the vertical axis and units of the separate window. Except for products with a fixed scale, the scale changes with the settings and the displayed range.
The center is the reference for price; smoothing is processing applied to the value after calculation.
0 or more is green and negative is red. At 0, the bar has no height.
By default, the same number for the bars and the line appears twice.
Changing the center method also changes the meaning of the unsmoothed value.
Divides the difference between price and the current center by the mean deviation of price from that center×0.015. The center is chosen from SMA, EMA, SMMA, LWMA and LSMA.
None, T3, SMA, EMA, SMMA, LWMA. With None, the unsmoothed value becomes the main line. T3's default coefficient of 0.618 differs from Smoothed Stochastic's default of 0.7.
With an SMA, LWMA or LSMA center, if all prices in the window are the same, the unsmoothed value is 0. With EMA or SMMA, past state remains and the value is normally ±66.67, but it is 0 if the center and the price coincide.
None and T3 start at bar CCI Period. Moving average smoothing starts at bar CCI Period+Smoothing Period−1. The unsmoothed line starts at bar CCI Period.
Start with the default SMA. Do not confuse the center with the later-stage smoothing.
Blue is the smoothed value, the bars show its sign, and gray is the unsmoothed value when enabled.
Check all input differences in the change example. The effects of several items overlap.
EMA and SMMA centers and recursive smoothing depend on where the history starts.
| Included file | Purpose / location |
|---|---|
| TRI_Smoothed_CCI.ex5 | The MT5 main file. Place it in MQL5/Indicators. |
The ZIP contains only 1 item, the main file. The manual is opened from the product page on the site. Source code is not included. MT5 only; registration, account authentication and placing a license file are not required. Use it without changing the file name.
Extract the ex5 main file rather than leaving it in the compressed file.
In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.
Refresh the Navigator or restart MT5, and apply it to the target chart. Place only 1 instance of the same product on 1 chart.
First check with the default values. Changes and removal are done from the chart's 'Indicators List'.
Using this product does not require allowing DLLs. When removed, this product's drawings are cleared.
There are 8 inputs. Change them on the Inputs tab of the properties. The English display name and the input name in the code are shown together.
InpCCIPeriodInpPriceInpCenterMethodInpSmoothMethodInpSmoothPeriodInpT3FactorInpShowCCIInpShowHistogramBecause of the smoothing state, the line may swing above and below 0 and the bar color may change even when the price stops. Even a small movement right after a stop can make the value before smoothing large.
±100 are level lines, not upper or lower limits of the value.
Even if 0.00 appears in the separate window header, there may be no value because the required history is insufficient. To distinguish this from a valid value of 0, also check whether the line exists and the bar at which drawing starts.
With center EMA or SMMA, or smoothing T3, EMA or SMMA, values can change with the start of the history. With center SMA, LWMA or LSMA combined with smoothing None, SMA or LWMA, it calculates within the required finite window.
The value of the latest bar changes while it is forming. Past values may also be recalculated when history is added or corrected, so this is not a guarantee of no repainting.
Inputs for unused lines and methods are also checked against the allowed range. Simply turning off the display does not cause invalid periods or similar values to be ignored.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
Displays, marks and notifications are records of calculation results. They do not direct trading decisions and do not guarantee future price movements.
Check the required number of history bars and the inputs for the lines to show. With out-of-range inputs it does not start, and 1 line giving the reason in English appears in the Experts tab.
Open the actual-size view of the real screen and check the line colors and the vertical axis.
The latest bar is forming. If past prices or the start of history change, values after recalculation can also change.
If the first display does not appear, check history loading and the input ranges. If an earlier display has stopped updating, first check the price feed and the terminal's connection status.
Averages the absolute differences from the current bar's center to all prices in the window, not from each past bar's own center. A mean deviation of 0 gives 0. With an SMA, LWMA or LSMA center, a window in which all prices are the same is also 0.
The internal EMA period is converted to (Smoothing Period+1)/2. The 6 stages of smoothing state are combined with coefficients and initialized with the first CCI value.
With smoothing None, an SMA center, Typical and period 14, it has the same definition as the standard CCI except for flat price windows. This is not a guarantee of identical values; differences arise in flat windows and from rounding. Do not extend this explanation to other centers or smoothing methods.
With period 2, the effect of rounding in the price calculation can stand out. Do not treat ±66.67 as a fixed upper limit.