MT5 indicators← Weighted CCI Run Histogram product page日本語の取扱説明書

This product is in preparation for release. Product files are not yet distributed; the manual is published so that you can review its content. This manual is an English translation of the Japanese manual. Images (screens and figures) are not translated and may contain Japanese text or earlier names.

For Trilogy users

Weighted CCI Run Histogram

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.

Indicator name: Weighted CCI Run HistogramMetaTrader 5Separate window

Read the height, bar color and 0-line color separately

CCI → range weight → cap0Bars: CCI state / 0 line: close compared with the baseline
Schematic diagram of how to read it. This is not an actual terminal screen.
1

HeightThe CCI after weighting and capping. The blue line and the bars have the same value.

2

Bar colorDetermined by a count kept above and below 0. It is not a simple number of consecutive bars.

3

Colored 0 lineCompares the close with the LSMA or EMA. This is a different condition from the sign of the bars.

2 CCIs by defaultWeight 0 = no weightingClip Level 0 = no capping
1

MT5 display and examples of changed settings

Compares the default settings and a settings change example on a screen with only this product applied.

Settings change example: these items are changed
Range weight
InpWeight
1 → 2
Cap height
InpClipLevel
250 → 150

All other inputs remain at their defaults. On a PC, the default is on the left and the change example on the right; at smartphone width they appear in the same order from top to bottom.

Default settingsInpWeight = 1 / InpClipLevel = 250
Weighted CCI Run Histogram default settings
Check the blue slow CCI, the orange fast CCI, the colored bars and the 0 line. At the edges of the vertical axis in the default image, scale labels overlap. Do not read the edge numbers as the upper limit of CCI; check the cap setting.
View the screen in detail at full size
Weighted CCI Run Histogram default settings (full size)
Example of changed settingsInpWeight = 2 / InpClipLevel = 150
Weighted CCI Run Histogram example of changed settings
The weight is changed from 1 to 2 and the cap from 250 to 150. In some places the line and bars become flat at ±150. The vertical axis display range also differs from the default example.
View the screen in detail at full size
Weighted CCI Run Histogram example of changed settings (full size)

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.

2

How to read it in 30 seconds

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.

For flat parts, also check the settings

Values above Clip Level stop at that height. It does not mean the price is not moving.

Do not read the colors as one

The gray, gold, green and red of the bars and the light blue and magenta of the 0 line follow different rules.

3

What it measures

Applies a common weight to the CCI of the typical price, then caps it above and below if needed.

Inputs to the CCI

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.

Weight coefficient

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.

Capping is a separate setting

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, gold, green and red

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.

4

Situations for reading the display

The bars and the blue line overlap

Indicator
They are the same slow CCI.
Cross-check
The heading also shows the same number 2 times.
Check
Do not interpret this as different indicators agreeing.
Caution
The fast CCI is orange.

The color returns to green or red partway

Indicator
The count has holding conditions.
Cross-check
Not only the last few bars but also the reached state of the opposite side matters.
Check
Check the count rules in the technical information.
Caution
It does not mean the latest Run Bars bars always have the same sign.

Only the 0 line changes color

Indicator
It is a comparison of the close and the baseline.
Cross-check
Light blue means the close is above the baseline, and magenta means below.
Check
Check it separately from the bar color.
Caution
On bars where the close equals the baseline, the 0 line is not drawn.
5

Steps for checking the display

1

Display with the default settings

Tell apart the blue and orange lines, the bars and the 0 line.

2

Look at the height limit

Check Weight and Clip Level, and see whether the values have been flattened by capping.

3

Check the meaning of the colors

Distinguish the bar count from the 0-line baseline.

4

Compare after changes

Record the changed items and compare with the default settings on a separate chart of the same timeframe.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Weighted_CCI_Run_Histogram.ex5The 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.

1

Extract the ZIP

Extract the ex5 main file rather than leaving it in the compressed file.

2

Open the data folder

In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.

3

Apply this product

Refresh the Navigator or restart MT5, and apply it to the target chart. Place only 1 instance of the same product on 1 chart.

4

Check the settings and display

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.

7

Settings

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.

Slow CCI period

English item name
Slow CCI Period
Input name
InpSlowPeriod
Default
14
Allowed range
Integer 2 to 1000
Description
The CCI period for the bars and the blue line.

Fast CCI period

English item name
Fast CCI Period
Input name
InpFastPeriod
Default
6
Allowed range
Integer 2 to 1000
Description
The orange CCI period. Being shorter than the slow period is not an input condition.

Extra CCI period

English item name
Extra CCI Period (0 = off)
Input name
InpExtraPeriod
Default
0
Allowed range
0, or integer 2 to 1000
Description
0 hides it. When specified, a purple line is added.

Bars for the color count to be reached

English item name
Run Bars
Input name
InpRunBars
Default
5
Allowed range
Integer 1 to 100
Description
The bar where the count is reached is colored gold. Because of the holding conditions in between, it is not a simple number of consecutive bars.

0-line reference

English item name
Zero Line Reference
Input name
InpZeroLine
Default
LSMA
Allowed range
LSMA / EMA / None
Description
The baseline compared with the close. None hides the colored 0 line.

LSMA period

English item name
LSMA Period
Input name
InpLSMAPeriod
Default
25
Allowed range
Integer 3 to 1000
Description
The close baseline when LSMA is selected. A value within range is required even if not selected.

EMA period

English item name
EMA Period
Input name
InpEMAPeriod
Default
34
Allowed range
Integer 1 to 1000
Description
The baseline when EMA is selected. A value within range is required even if not selected.

EMA price

English item name
EMA Applied Price
Input name
InpEMAPrice
Default
Close
Allowed range
Close / Open / High / Low / Median / Typical / Weighted
Description
Changes only the price used for the EMA. The CCI stays on the typical price.

Range weight

English item name
Weight (0 = off)
Input name
InpWeight
Default
1
Allowed range
0, or 0.01 to 10
Description
If 0, the coefficient is 1. If positive, this value is multiplied by the ratio of the short-term and long-term average TR.

Cap height

English item name
Clip Level (0 = off)
Input name
InpClipLevel
Default
250
Allowed range
Integer 0 to 1000
Description
If 0, there is no limit. If positive, the final value is stopped at ± this height.

Closed-bar level cross notification

English item name
Alert on Closed-Bar Level Cross
Input name
InpAlertCross
Default
false
Allowed range
true / false
Description
Default false. Notifies you when a slow CCI level crossing and the fast CCI position line up.

Upper level for notification

English item name
Upper Alert Level
Input name
InpAlertUpper
Default
0
Allowed range
−1000 to 1000, at least the lower side
Description
If both notifications and capping are enabled, set it below Clip Level.

Lower level for notification

English item name
Lower Alert Level
Input name
InpAlertLower
Default
0
Allowed range
−1000 to 1000, at most the upper side
Description
If both notifications and capping are enabled, set it greater than −Clip Level.
8

Usage specifications

Forming bar

The 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.

Do not judge blanks by the displayed numbers alone

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.

Start of display

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.

Not a simple replacement for the standard CCI

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.

Scope of notifications

This product has no email or push sending function of its own. Notification sounds also depend on the terminal settings.

Only 1 instance of the same product on 1 chart

This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.

For on-screen display only

Displays, marks and notifications are records of calculation results. They do not direct trading decisions and do not guarantee future price movements.

9

Troubleshooting and usage notes

Nothing is displayed

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.

Details are hard to read

Open the full-size display of the comparison image. In the terminal, enlarge the separate window vertically to check the lines and scale.

The line stops at the same height

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.

Only some lines are not shown

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.

No notification appears

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.

10

Technical information and specification details

Exact count rules

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 and baseline

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).

Start of the 0 line and history

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.

Notification conditions

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.

When notifications occur

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.

Calculation load and scale

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.

When the range is 0, and capping

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.

Heading and notification levels

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.

Reading the notification text

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.