MT5 indicators← Percent Range Oscillator 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

Percent Range Oscillator

Shows where RSI or CCI sits relative to its own recent highest and lowest values. You can choose a line or direction bars, 2 scales and weighted smoothing.

Indicator name: Percent Range OscillatorMetaTrader 5Separate window

Turn the indicator value into a position within the period

Replace it with the indicator's own rangePrice → RSI or CCIPosition relative to the recent highest and lowest valuesLWMA → scale → line or direction bars
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Base indicatorCalculates RSI or CCI from price.

2

Recent rangeConverts it to a position relative to the highest and lowest values over Range Period bars. It is not the RSI value itself.

3

Scale and drawing style−50 to +50 or 0 to 100. Choose a line, or bars colored by the change from the previous bar.

Default: RSI 14Range: 14 barsSmoothing: LWMA
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
Position smoothing
InpSmoothingPeriod
1 → 3
Drawing style
InpDrawStyle
Line → Direction Histogram

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 settingsInpSmoothingPeriod = 1 / InpDrawStyle = Line
Percent Range Oscillator default settings
The default is a blue line on a −50 to +50 scale. A line at +50 overlaps the upper frame of the window and can be hard to see in places.
View the screen in detail at full size
Percent Range Oscillator default settings (actual size)
Settings change exampleInpSmoothingPeriod = 3 / InpDrawStyle = Direction Histogram
Percent Range Oscillator settings change example
Smoothing changed to 3 and drawing style changed to Direction Histogram. Green and red come from comparing the value with the previous bar and are separate from whether the bar is positive or negative.
View the screen in detail at full size
Percent Range Oscillator settings change example (actual 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

Height is position

Even a high RSI does not reach the top unless it is the recent highest value.

Color is change

A bar is green if above the previous value and red if below. If equal, it keeps the previous color.

Read the center with its conditions too

The center appears not only at the midpoint of the range but also in a calculation window where the base value does not move.

3

What it measures

Replaces the RSI or CCI value itself with its position within that indicator's own period.

Position calculation

For the base indicator over Range Period bars including the current bar, calculates (current value−minimum)/(maximum−minimum)×100. For −50 to +50, 50 is subtracted from this value.

A flat window is the center

If the maximum and minimum are the same, or their difference is no more than one billionth of the sum of their absolute values, the center is used. This keeps very small rounding differences from becoming large differences in position.

Smoothing and drawing style

Smoothing is an LWMA that weights newer bars more heavily. The line and the bars use the same calculated value, and there is no separate average line. There are no 20 or 80 level lines either.

The first value shown

With base period n, range W and smoothing S, RSI starts at bar n+W+S−1 and CCI at bar n+W+S−2. The default RSI starts at the 28th bar; CCI 14 with range 14 and smoothing 1 starts at the 27th bar.

Why values line up at the edges

Without smoothing, when the base indicator makes a new highest or lowest value within the period, the value sits at an edge. With range 2 and smoothing 1, only −50, 0 and +50 appear (0, 50 and 100 on the other scale). Adding smoothing also produces in-between values.

Sections without movement

While earlier values are leaving the window, the position moves, and once the base values are all the same it becomes the center. With the default of close and no smoothing, if constant closes continue, the rough guide is 13 bars for RSI and 26 bars when switched to CCI 14. Adding smoothing requires even more bars before the display settles.

4

Situations for reading the display

No line is visible at the top

Indicator
Near +50
Cross-check
Check the upper frame of the window and the actual-size image
Check
Read it as a line overlapping the frame
Caution
Do not immediately conclude that the line has disappeared.

The bar is below 0 but green

Indicator
Bar position and color
Cross-check
Compare with the previous bar's value
Check
Even at a negative position, it is green if higher than before
Caution
It does not mean the price rose.

The value moved to the center

Indicator
0 or 50
Cross-check
Check how the base indicator changed within the range
Check
Consider the flat-window rule too
Caution
The center alone cannot tell you whether it is the midpoint of the position or a flat window.
5

Steps for checking the display

1

Decide the base indicator and the price

Check RSI/CCI, the period and the price used in the calculation.

2

Separate range and smoothing

Range Period is the window over which position is measured; Smoothing Period is the smoothing of the position.

3

Check the scale

Centered is −50 to +50, and 0-100 is 0 to 100. The centers are 0 and 50 respectively.

4

With bars, read the color too

Check the bar height and the increase or decrease from the previous bar separately.

6

Installation and checking the package contents

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

Base indicator

Name shown on screen
Base Oscillator
Input name
InpBase
Default
RSI
Allowed range
RSI / CCI
Description
The window and line names become Percent Range RSI or Percent Range CCI.

Base period

Name shown on screen
Base Period
Input name
InpBasePeriod
Default
14
Allowed range
2〜1000
Description
The number of bars for calculating RSI or CCI. It is separate from the number of bars in the range.

Price used in the calculation

Name shown on screen
Applied Price
Input name
InpPrice
Default
Close
Allowed range
Close / Open / High / Low / Median / Typical / Weighted
Description
Median=(high+low)/2, Typical=(high+low+close)/3, Weighted=(high+low+close×2)/4.

Range for measuring position

Name shown on screen
Range Period
Input name
InpRangePeriod
Default
14
Allowed range
2〜1000
Description
The number of bars, including the current bar, over which the maximum and minimum of the base indicator are searched.

Position smoothing

Name shown on screen
Smoothing Period (LWMA, 1 = off)
Input name
InpSmoothingPeriod
Default
1
Allowed range
1〜1000
Description
Uses LWMA. 1 means no smoothing. The values differ from a simple average of the same period.

Output scale

Name shown on screen
Output Scale
Input name
InpScale
Default
-50 to +50
Allowed range
0 to 100 / -50 to +50
Description
The vertical axis is also fixed to this range. The center level line is at 50 or 0.

Drawing style

Name shown on screen
Draw Style
Input name
InpDrawStyle
Default
Line
Allowed range
Line / Direction Histogram
Description
Line is blue. For bars, an increase in value is green, a decrease is red, and an equal value keeps the previous color. The first valid bar is green.
8

Usage specifications

Length of time at the edges

How often values line up at the edges differs by data, period and smoothing. Without smoothing the structure reaches the edges easily, but being at an edge is not read as a timing for trading.

Start of the history

RSI depends on the start of the history, and in the early part its values and colors can differ from a chart with a different starting point. The difference shrinks, but an exact match is not guaranteed. CCI can be calculated from the required window if that window is the same.

Display rounding and color

The color for increase or decrease is determined by the value before rounding. The color may change even if the header shows the same 2 decimal places.

Header name

It shows RSI/CCI, base period, price, range, smoothing and scale, in that order. The drawing style is not included in the window name. Startup error messages begin with Percent Range Oscillator.

The forming bar changes

The value of the latest bar changes with price updates. If past prices or the start of the history change, values after recalculation may also change. This is not a guarantee of no repainting.

Do not judge by the 0 in the header alone

Even when a line is not drawn because the required history is insufficient, the header may show 0 at the display precision. Check whether the line exists together with the number of bars required. %B is shown with 3 decimal places and the other 3 products with 2 decimal places.

It does not start with out-of-range inputs

Check the input values and their combinations. If it cannot start, a 1-line reason in English appears in the MT5 Experts tab.

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

It shows 0.00

With Centered it may be the center value, and with 0-100 it may be the bottom value. It can also mean that the bars needed are lacking, so check the line and the number of history bars.

The latest bar's value moves

While the bar is forming, the value and color change with price. If you choose Open, the open is fixed during the bar, so it differs from choosing other prices.

The +50 line is hard to read

It overlaps the upper frame of the fixed vertical axis. Use the actual-size view together with the window heading.

No lines appear

Check where drawing starts in Chapter 3 and the input ranges in Chapter 7. Distinguish a line hidden by an input from a line that does not yet have the bars its calculation needs.

The settings are not accepted

Check the reason in the MT5 Experts tab and set the inputs back within the allowed range.

Details are hard to read

Open "View the screen in detail at actual size". Also check the vertical scale and the screen zoom 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

RSI and CCI calculation

RSI starts from the average of the changes over the first n bars and is then smoothed by 1/n. If the average decline is 0, it is 100 if there are gains and 50 if both are 0. CCI is (price−simple average)/(mean absolute deviation×0.015), and a flat window is 0.

Differences from the MT5 standard

RSI 14/range 14 and RSI 5/range 5 with close, smoothing 1 and 0 to 100 have the same definition as the position of the standard RSI within the period. However, on bars where the average decline is 0, this product uses 100 or 50, so the position differs from cases where the standard returns 0. We do not state that it always gives the same values as the standard. CCI is not presented as equal to the standard either.

Smoothing, scale and updates

Applies LWMA to the position within the period, then subtracts 50 if needed. The direction color is decided by the increase or decrease of the same value before the scale is changed. Normal updates update the latest bar, but if history or prices change, past values after recalculation can also change.