Check the longest period
The first value appears at bar N, where N is the longest of the 9 periods.
Calculates the CCI of the close over 9 periods and shows their sum as bars and a blue line. The bars are divided into 4 colors by combining the side of 0 and the increase or decrease from the previous bar.
The bars and the line are the same numberThe sum of 9 CCIs. It is not an average or a conversion to 0 to 100.
The positive side has 2 colorsDark green if higher than the previous bar, light green if it did not rise.
0 and below also has 2 colorsDark red if lower than the previous bar, light red if it did not fall.
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 first value appears at bar N, where N is the longest of the 9 periods.
A few large values can decide the sign of the sum. It does not show the direction of all 9 lines.
Check whether the value is above 0 or at or below 0, and read from the color whether it is higher or lower than the previous bar.
Adds 9 close-based CCIs in the input order and draws the same sum as bars and a line.
Each CCI divides the difference between the close and the average over the period by 0.015 times the mean absolute deviation. The 9 values are added; no average is taken.
Each period is 2 to 1000, and there is no constraint on the order. If the same period is specified more than once, that CCI is added as many times as it is specified.
Positive and greater than the previous value is dark green; positive otherwise is light green. At or below 0 and less than the previous value is dark red; at or below 0 otherwise is light red.
The top and bottom of the vertical axis are not fixed. Do not apply guides such as ±100 for a normal CCI directly to the sum. The size changes with the periods and with offsetting among the 9 values.
Check the longest period in particular. Period 9 is not necessarily the longest.
Prepare at least as many bars of history as the longest period.
Separate the side of 0 of the sum from the change from the previous bar.
Confirm that the longest period and the scale of the sum change.
| Included file | Purpose / location |
|---|---|
| TRI_Multi_Period_CCI_Sum.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 9 inputs. Change them on the Inputs tab of the properties. The English item names defined in the source are shown together with the input names.
InpPeriod1InpPeriod2InpPeriod3InpPeriod4InpPeriod5InpPeriod6InpPeriod7InpPeriod8InpPeriod9The values and colors of the rightmost bar change while the bar is forming. Past displays are also recalculated when history is added or corrected or settings are changed.
If the required history is insufficient, lines and bars are not drawn. The 0 in the header alone cannot distinguish a valid 0 from the state before calculation, so check the number of bars and the drawing together.
Because there is no earlier valid value to compare with, the first value is light green if positive and light red if 0 or below.
If all closes in a window are the same, that CCI is added as 0. Including this handling, an exact match with the sum of 9 MT5 standard CCIs is not guaranteed.
It only displays colors and values. There is no function that presents a particular color as a notification signal.
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 history and the input ranges. With out-of-range inputs, the indicator does not calculate or draw, and the reason appears in English on the MT5 "Experts" tab.
Open the full-size display of the comparison image. In the terminal, enlarge the separate window vertically to check the lines and scale.
It is the sum of 9 values. It is not on the same scale as 1 CCI. Do not read the scale marks at the edge of the display as a calculated upper limit.
With period 2, the CCI is roughly ±66.67 if the 2 closes differ, and 0 if they are equal. Using many short periods can make the sum step-like.
The larger the periods and history, the more calculation is needed. When changing settings or the timeframe, wait until the display is updated.
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.
If the sum is exactly 0, it is judged on the at-or-below-0 side. A value equal to the previous bar takes the "did not rise" color if positive and the "did not fall" color if at or below 0. Even when the displayed digits are the same, tiny differences in the internal values can change the color.
Recounts the 9 CCIs from each bar's window and adds them in order from Period 1. On bars where the same reference closes are available, there is no smoothing state that depends on where older history starts. However, only the first valid value on that chart may have a different color because there is no previous value.
If M is the maximum absolute value of the 9 CCIs on the same bar, the absolute value of the sum does not exceed 9 × M. Values of opposite sign can also offset each other, so it is not always larger than the value of 1 line.
The window name is CCI Sum, with the 9 periods listed in parentheses in input order. The heading shows only 1 value, the sum, with 2 decimal places. The blue line has the same value as the bars, so it is not shown twice.