MT5 indicators← Range Zone Bars 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

Range Zone Bars

Shows with colors whether the close is in the upper side, lower side or middle of a high-low range with a variable number of bars. An arrow is placed only on bars where the last upper / lower state switched.

Indicator name: Range Zone BarsMetaTrader 5Main chart

Bars show the current position; arrows show state switches

Previous bar's ADX → number of bars R searched for the high and lowClose in the upper / lower side of the range → colored barAn arrow even when moving to the opposite side across the middleColors and arrows are shown under different conditions
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Green and red barsGreen in the upper side, red in the lower side. In the middle, the product's bars are not drawn.

2

ArrowsNo arrow for the first state; an arrow is placed on the bar that switches from the remembered opposite side.

3

Forming barBy default arrows are limited to closed bars, but the bars are also shown on the forming bar.

Bar spanning the full high-lowState is remembered in the middleNo alert function for arrows
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
Upper and lower band ratio
InpZonePercent
30 → 20
Range factor
InpRangeFactor
150 → 100
Colored bars
InpShowBars
true → false

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 settingsInpZonePercent = 30 / InpRangeFactor = 150 / InpShowBars = true
Range Zone Bars default settings
Colored bars from high to low and arrows at state switches are shown.
View the screen in detail at full size
Range Zone Bars default settings (actual size)
Settings change exampleInpZonePercent = 20 / InpRangeFactor = 100 / InpShowBars = false
Range Zone Bars settings change example
Zone Percent is changed to 20 and Range Factor to 100, and the bars are hidden. The arrow conditions also change.
View the screen in detail at full size
Range Zone Bars settings change example (actual size)

Example shown: 1-minute chart (M1). This is an example for explaining the display. The settings change example is not a recommended value. Details can be checked in the full-size view. Please also check the price scale of the main chart and the positions of the candlesticks.

2

How to read it in 30 seconds

Read the ends of the range

The width of the upper and lower sides is set by Zone Percent.

The middle is blank

Even without the product's color, the preceding upper / lower state is kept internally.

Arrows only is also possible

Show Bars and Show Switch can be switched separately.

3

What it measures

Classifies the position of the close not with the high and low of a fixed number of bars but with a number of bars derived from the previous bar's ADX.

Search bars

R = ceil(Range Factor ÷ max(previous bar's ADX, 1)). A smaller ADX makes the range longer.

Upper / lower side

Zone Percent % of the high-low difference forms the upper and lower bands. If the close is above the upper boundary it is green; if below the lower boundary it is red. A value equal to a boundary is treated as the middle.

Remembered state

In the middle, the last upper / lower side is kept. A change to the opposite side gives an arrow. No arrow is placed on the bar where the state is first decided.

Bar shape

The product's bar spans each bar's high to low. It is separate from the body of the original candlestick and its bullish / bearish colors.

4

Situations for reading the display

Bars without a colored bar

Indicator
The close is in the middle, or there is not enough history for display.
Cross-check
Check Show Bars and the number of bars searched.
Check
Do not mistake the middle for an invalid value or a stopped data feed.
Caution
The state for arrows is kept even in the middle.

Arrows do not appear on every bar

Indicator
While the same side continues, it is not a switch.
Cross-check
Check the previous upper / lower side.
Check
Read it as a record of the bar where the switch occurred.
Caution
Arrows are not a forecast of future direction.
5

Steps for checking the display

1

Check the meaning of the colors

Green is the upper side of the range, red is the lower side.

2

Read only the switches

Compare the bar with an arrow and the non-middle state before it.

3

Separate forming and closed bars

Confirm that Closed Bars Only affects only the arrows.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Range_Zone_Bars.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'.

This product does not require DLL permission or enabling automated trading. When removed, this product's drawings are cleared.

7

Settings

There are 7 inputs. Change them on the Inputs tab of the properties. The English display name and the input name in the code are shown together.

Upper and lower band ratio

Name shown on screen
Zone (%)
Input name
InpZonePercent
Default
30
Allowed range
1–50%
Description
Width of each of the upper and lower sides relative to the high-low difference.

Range factor

Name shown on screen
Range Factor
Input name
InpRangeFactor
Default
150
Allowed range
1〜10000
Description
Numerator used to calculate the number of bars R searched from the previous bar's ADX.

ADX period

Name shown on screen
ADX Period
Input name
InpADXPeriod
Default
14
Allowed range
1–500 bars
Description
Period of the Exponential-type ADX used for the number of bars searched.

Colored bars

Name shown on screen
Show Zone Bars
Input name
InpShowBars
Default
true
Allowed range
true / false
Description
Whether to draw each bar from its high to its low in color.

Switch arrows

Name shown on screen
Show Switch Arrows
Input name
InpShowSwitch
Default
true
Allowed range
true / false
Description
Whether to draw an arrow on a bar where the last non-middle state changed to the opposite side.

Arrows on closed bars only

Name shown on screen
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
true does not show arrows on the latest forming bar. The bars are not affected.

Arrow gap

Name shown on screen
Arrow Gap (pixels)
Input name
InpArrowGap
Default
8
Allowed range
0〜100 pixels
Description
Number of pixels on screen by which arrows are placed away from the high or low.
8

Usage specifications

Updates on the forming bar

The bars change with the close and the high-low range. With Closed Bars Only=false, the arrows can also change while the bar is forming.

Required history

With ADX period n, classification starts at the earliest from bar 2n+2. If R bars are not available at that bar, the display is delayed further.

Data Window

Range Bars is the bar count derived from the previous ADX, and ADX is the value for that bar. Do not apply the same point-in-time formula to both.

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

This product shows calculation results through plot buffers and does not place trade orders. It does not guarantee profit or future price movement.

9

Troubleshooting and usage notes

Little is displayed

A small ADX makes the required range longer. Check the history, Show Bars and Show Switch.

Bars and arrows appear at different times

By default, arrows are on closed bars only. No arrow appears when returning from the middle to the same side, or for the first state.

It does not start after changing inputs

An input outside the allowed range is refused at startup. Check the English reason shown on the Experts tab of the Toolbox, not an explanation on the chart, and confirm by returning to the default values.

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

Classification formula

HH=max(H[i−R+1..i]), LL=min(L[i−R+1..i]), w=(HH−LL)×Zone Percent/100. C>HH−w is the upper side, C<LL+w is the lower side, and anything else is the middle.

ADX type

An Exponential type that exponentially smooths the ratio of price differences and direction. It is treated separately from the Wilder type. Values have been cross-checked against the MT5 standard ADX with periods 14, 250 and 1.

Handling of history

Only values up to that bar are used. It is recalculated when history is added or corrected, or settings are changed. This does not guarantee that values never change.