First tell the 2 lines apart
Blue is the slow CCI and orange is the fast CCI. The purple additional CCI is not shown by default.
Applies a range-ratio weight and capping to 2 or 3 CCIs, and shows the slow CCI as a line and bars. The bar colors and the color of the line at the 0 level show separate calculation conditions.
HeightThe CCI after weighting and capping. The blue line and the bars have the same value.
Bar colorDetermined by a count kept above and below 0. It is not a simple number of consecutive bars.
Colored 0 lineCompares the close with the LSMA or EMA. This is a different condition from the sign of the bars.
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.
Blue is the slow CCI and orange is the fast CCI. The purple additional CCI is not shown by default.
Values above Clip Level stop at that height. It does not mean the price is not moving.
The gray, gold, green and red of the bars and the light blue and magenta of the 0 line follow different rules.
Applies a common weight to the CCI of the typical price, then caps it above and below if needed.
The typical price is (high + low + close) ÷ 3. Its difference from the average over the period is divided by 0.015 times the mean absolute deviation. A window with only identical typical prices gives 0.
If Weight is positive, the value is multiplied by Weight × 7-bar average TR ÷ 49-bar average TR. If the 49-bar average TR is 0, the coefficient is Weight. When Weight is 0, the coefficient is 1, which removes only the weighting.
If Clip Level is positive, the weighted value is kept within ± that value. If 0, there is no capping. Even when Weight is 0, capping remains if Clip Level is positive.
Gray is before the count is reached, gold is the bar where Run Bars is reached, and green and red are the positive and negative sides after it is reached. A bar at 0 is gray and neither increases nor resets the count.
Tell apart the blue and orange lines, the bars and the 0 line.
Check Weight and Clip Level, and see whether the values have been flattened by capping.
Distinguish the bar count from the 0-line baseline.
Record the changed items and compare with the default settings on a separate chart of the same timeframe.
| Included file | Purpose / location |
|---|---|
| TRI_Weighted_CCI_Run_Histogram.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 13 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.
InpSlowPeriodInpFastPeriodInpExtraPeriodInpRunBarsInpZeroLineInpLSMAPeriodInpEMAPeriodInpEMAPriceInpWeightInpClipLevelInpAlertCrossInpAlertUpperInpAlertLowerThe 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.
When weighting is enabled, each CCI starts from bar 49 or the bar number of its period, whichever is larger. When weighting is removed, each starts from the bar number of its period. The 0 line additionally requires the reference to be prepared.
It combines handling for windows with a constant price, weights, caps and count colors. Do not treat its displayed values as the same as the standard CCI.
This product has no email or push sending function of its own. Notification sounds also depend on the terminal settings.
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.
Check whether Clip Level is enabled. To remove only the range weighting, set Weight to 0; to also remove capping, set Clip Level to 0 as well.
The additional CCI is hidden if Extra CCI Period is 0. The 0 line also does not appear with None or when the close equals the baseline. The required history also differs for each period.
It does not notify right after the indicator is attached; it checks the conditions from the next closed bar. The fast CCI must also be on the same side of the level.
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.
Positive and negative counts are kept separately. When the sign changes from a state in which the opposite side has already reached Run Bars, the count for the new side starts from 0. In other short sections on the opposite side, the earlier count is kept, so the count can be reached even with opposite signs or 0 in between. Only the bar where the count is reached is gold; bars on the same side after it is reached are green or red.
TR is the high-low range that also includes the previous close; for the first bar it is high − low. The TR average is a simple average. The LSMA is 3 × linear weighted average − 2 × simple average of the close. The EMA starts from the first specified price and is updated with a coefficient of 2 ÷ (period + 1).
The LSMA 0 line starts from the bar where both the slow CCI and the LSMA are ready, and the EMA 0 line from the start of the slow CCI. The count, the EMA and the effect of the first TR can change depending on how the history starts.
An upper notification occurs when the slow CCI of the latest closed bar is strictly above the upper level, the previous bar is at or below the upper level, and the fast CCI is also above the upper level. For the lower side, the conditions are that the slow CCI is below the lower level, the previous bar is at or above the lower level, and the fast CCI is also below the lower level. It checks only when the bars needed for the comparison exist.
The display is calculated even while forming, but notifications occur only when a new closed bar is recognized. There is no notification the first time, and past crossings are not notified all at once. Even after an interruption, only the latest 1 closed bar is checked.
With long periods or long history, recalculation can take time. Fixed auxiliary levels can also go off screen, and the scale visible on the screen does not mean the maximum or minimum of the values.
If the latest 7-bar average TR is 0 and the 49-bar average TR is not 0, the weight is 0 and the displayed CCI value is also 0. If the 49-bar average TR is also 0, the coefficient is Weight. In that case, if the CCI period is 49 or less, the CCI is also 0, but if it is longer than 49, earlier price movement remains in the window and it may not be 0. After a quiet section, the ratio becomes large and can reach the cap.
The numbers in the window name are, in order, the slow, fast and additional periods, Run Bars, Weight and Clip Level. The 0-line baseline does not appear in the window name. The numbers in the heading are, in order, the bars, the slow line, the fast line and, if enabled, the additional line, as values after weighting and capping. The 0-line value is not shown. The notification levels are also compared with the processed values, so changing Weight can change which bars are notified.
In the notification text, crossed above means a closed bar that rose above the upper level, and crossed below means a closed bar that fell below the lower level; both include the condition that the fast CCI is also outside the same level. The end shows the symbol, the timeframe and the opening time of the closed bar. The same English text remains in the Experts log. Even right after reattaching with changed settings, past crossings are not notified.