MT5 indicators← Candle Body Balance 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

Candle Body Balance

Aggregates recent candle bodies and shows the share of the total taken by bodies whose close is above the open. It is not a ratio of bar counts or of wick lengths.

Indicator name: Candle Body BalanceMetaTrader 5Separate window

Aggregates the size of candle bodies, not the number of bars

Upward bodies P / downward bodies QValue = 100 × P ÷ (P + Q)PQ
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Uses bodies onlySplits each bar's close − open into positive and negative. Wicks and gaps between bars are not included.

2

Shows a ratioDivides the total of upward bodies by the total of both upward and downward bodies, and multiplies by 100.

3

Weights and averageLinear gives newer bars more weight, and the orange average line is a simple average of the main line.

Not a ratio of bar counts50 has 2 meaningsDefault is main line + average line
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
Body aggregation period
InpPeriod
10 → 15
Body weighting
InpWeighting
Equal → Linear
Average period
InpAveragePeriod
10 → 5

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 settingsInpPeriod = 10 / InpWeighting = Equal / InpAveragePeriod = 10
Candle Body Balance default settings
A blue main line summarizing the last 10 bars with Equal, and an orange dashed line showing its 10-bar simple average.
View the screen in detail at full size
Candle Body Balance default settings (full size)
Example of changed settingsInpPeriod = 15 / InpWeighting = Linear / InpAveragePeriod = 5
Candle Body Balance example of changed settings
Changed to period 15, Linear and average 5. All 3 items differ, so do not compare it as a change in only one of them.
View the screen in detail at full size
Candle Body Balance 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

Look inside the bar

Compares the bar's own open and close, not the previous close.

Reading 50

The value is 50 both when the totals of upward and downward bodies are equal and when all bodies are 0.

Check the weighting

Equal uses the same weight; Linear counts the latest bars more heavily.

3

What it measures

Measures the ratio of bodies within bars. It aggregates something different from Up-Down Move Balance, which measures price changes between bars.

Definition of the body

If close > open, the difference is added to P; if close < open, the absolute value of the difference is added to Q. If they are equal, the bar counts as 1 bar in the period but is added to neither P nor Q.

Meaning of the main line

100 × P ÷ (P + Q). Upward bodies only give 100, downward bodies only give 0, and P = Q gives 50. If both are 0, the value is also set to 50.

Difference between weightings

Equal gives each bar a weight of 1. Linear gives the latest bar a weight of Period, decreasing by 1 for each bar that is 1 bar older, and 1 for the oldest.

Levels and average

70, 50 and 30 are scale marks for the share taken by upward bodies. With Linear, it is the share of the weighted total. The orange dashed line is a simple average of the main line.

4

Situations for reading the display

Low even though there are many upward bars

Indicator
It aggregates the size of bodies, not the number of bars.
Cross-check
Compare small upward bodies with large downward bodies.
Check
Even with 2 upward bars and 1 downward bar, the main line can be below 50.
Caution
Do not reinterpret it as a ratio of bar counts.

The line stays at 50

Indicator
The totals of upward and downward bodies are the same, or both are 0.
Cross-check
Check the opens and closes in the period.
Check
If all bodies are 0, the calculated result is also 50.
Caution
A 50 in the heading alone cannot distinguish the 2 states.

Shorten the average line

Indicator
Change Average Period.
Cross-check
Only the number of bars in the average changes, independently of the main line.
Check
1 gives the same value as the main line; 0 hides it.
Caution
Even when Weighting is Linear, the average line is a simple average.
5

Steps for checking the display

1

Set the Period window

Check the number of recent bars, including the current bar.

2

Check Weighting

With Equal and Linear, the same bodies are aggregated with different weights.

3

Read the main line as a ratio

Check the meaning of 0, 50 and 100 by going back to the body totals.

4

Check whether the average is shown

If Average Period is 0, read the main line only; if it is 1 or more, read the average line as well.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Candle_Body_Balance.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 3 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.

Body aggregation period

English item name
Period
Input name
InpPeriod
Default
10
Allowed range
2〜1000
Description
The number of recent bars, including the current bar.

Body weighting

English item name
Weighting
Input name
InpWeighting
Default
Equal
Allowed range
Equal / Linear
Description
Equal gives all bars a weight of 1; Linear gives weights from Period for the latest bar to 1 for the oldest.

Average period

English item name
Average Period (0 = off)
Input name
InpAveragePeriod
Default
10
Allowed range
0〜1000
Description
A simple average of the main line. 0 hides it, and 1 gives the same value as the main line. The default is 10.
8

Usage specifications

Start of display

The main line starts from bar Period and the average from bar Period+Average Period−1 (average 1 or more). The defaults are bar 10 and bar 19.

Distinguishing 0 and 50

A main line of 0 means there are no up bodies and there are down bodies; 50 means they balance or all bodies are 0. Do not judge from the header alone that it has been calculated; check the required number of bars and whether the line is drawn.

Values on the forming bar

When the close of the latest bar moves, the main line and the average change. Closed bars are calculated with the window at that time, but if the original price history is corrected, the results can also change.

Vertical axis and display

A fixed vertical axis of 0 to 100, with 2 decimal places. 0 and 100 overlap the window frame. An internal value of 100 may deviate up or down in the last digit.

Header and functions

When the average is shown, the header lists the main line and then the average. There are no notifications, sounds or emails, and it does not draw objects on the price chart.

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

No lines appear

The main line and the average require different numbers of bars. Outside the input range, the indicator does not calculate and outputs the reason in English to the Experts tab.

The average line is not visible

Check whether Average Period is 0 or whether the history needed for the average is insufficient. With 1, it overlaps the main line.

The value differs from what you expect

Changes from the previous bar, wicks and gaps are not aggregated. Check the open and close within each bar, and Weighting.

Cannot be distinguished by the display alone

The line alone does not show whether 50 is a balance or all bodies being 0. Read a 0 display as well after checking the number of history bars.

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

Formula

Each bar's positive body is added to the weighted P, and the absolute value of its negative body to the weighted Q. If P + Q is 0, the value is 50; otherwise it is 100 × P / (P + Q).

Average and history

The average is a simple average of the latest Average Period main-line values. As long as the required window is the same, it does not depend on where the older history starts. Blanks before the main line are not averaged as 0.

Difference from other balance displays

To convert this ratio of P and Q to −100 to +100, use 2 × main line − 100. However, Up-Down Move Balance aggregates different change ranges, so this does not mean the two products give the same value.

Scope of functions

Draws a solid blue line, an orange dashed line and silver level lines in a separate window. Equality with MT5 standard indicators or other products is not guaranteed. The display is a record of the calculation results.