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

Oscillator Bands

Compares the base value, an average line and a dispersion band in the same window.

Indicator name: Oscillator BandsMetaTrader 5Separate window

Read the blue base line and the gray bands separately

Blue: base Orange: additional average Gray: upper, middle and lower band
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Blue lineThe calculated value selected from %K, CCI or MA Gap. Changing the type also changes the unit.

2

3 gray linesThe simple average of the blue line and the dispersion around it.

3

Orange average lineCan be shown additionally. It has a different period and method from the band center line.

3 base typesBands use population standard deviationVertical axis is automatic
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
Base / Oscillator Base
InpBase
Stochastic %K → CCI
Base period / Oscillator Period (%K, CCI)
InpOscPeriod
1 → 20
Additional average period / MA Period (0 = off)
InpMAPeriod
0 → 5
Band period / Bands Period
InpBandsPeriod
10 → 30
Band width / Bands Width (x deviation)
InpBandsWidth
2 → 1.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 settingsInpBase = Stochastic %K / InpOscPeriod = 1 / InpMAPeriod = 0 / InpBandsPeriod = 10 / InpBandsWidth = 2
Oscillator Bands default settings
The default is %K with no additional average. The gray band extends up and down, so the vertical axis is not fixed at 0 to 100.
View the screen in detail at full size
Oscillator Bands default settings (actual size)
Settings change exampleInpBase = CCI / InpOscPeriod = 20 / InpMAPeriod = 5 / InpBandsPeriod = 30 / InpBandsWidth = 1.5
Oscillator Bands settings change example
Example showing CCI and an additional SMA. Blue is the CCI, orange is the SMA, and the 3 gray lines are the bands.
View the screen in detail at full size
Oscillator Bands 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

Check the base

The default is %K. When switching to CCI, also set Oscillator Period to 2 or more.

Tell the lines apart

Blue = base, orange = additional average, gray = upper, middle and lower band.

Check the scale

The %K bands also go outside 0 to 100. CCI and MA Gap are on different scales.

3

What it measures

The bands show the dispersion of recent calculated values. They do not indicate a price target or a future range.

%K

Subtracts the lowest low in the period from each bar's close, sums this over Slowing bars, divides by the sum of highest high − lowest low for the same bars, and multiplies by 100.

CCI

Divides the difference of the selected price from its period average by 0.015 times the mean absolute deviation. In a flat window it is 0. A 0 does not necessarily mean the window is flat.

MA Gap

Subtracts the long-term EMA from the short-term EMA of the selected price. The unit is price, and both EMAs start from the first price of the history.

The average and the bands are separate

The additional average line uses the selected method and period. The band center is the simple average of the base value, and the upper and lower lines add and subtract the population standard deviation × width. Changing the additional average settings does not change the band calculation.

4

Situations for reading the display

The bands widened

Indicator
The upper and lower gray lines are farther apart.
Cross-check
Compare with the same base, period and width.
Check
Read it as a section where the dispersion of the base value has become larger.
Caution
Do not read outside the bands as a time of overextension or reversal.

%K became 100

Indicator
The blue line shows 100.
Cross-check
Distinguish whether all ranges in the Slowing summation window are 0.
Check
If the sum of the ranges is 0, it is 100.
Caution
The reverse does not hold. It can be 100 even when there is a range.

I switched the base

Indicator
The height of the line and the vertical axis change greatly.
Cross-check
Check %K, CCI or MA Gap and the period.
Check
Compare within the same unit and the same settings.
Caution
Do not directly compare the line heights of different bases.
5

Steps for checking the display

1

Open with the defaults

Check the blue %K, the gray bands and the 50 level line.

2

Add an average

Set MA Period to 1 or more and distinguish the orange line from the gray center line.

3

Change the base

For CCI, use a period of 2 or more. For MA Gap, make Slow greater than Fast.

4

Cross-check the name and inputs

Read the base, average and bands in the window name, and check inputs not shown there in the Inputs tab.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Oscillator_Bands.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 10 inputs. Change them in the Inputs tab of the properties window. The English item names and input names defined in the source are shown together.

Base

English item name
Oscillator Base
Input name
InpBase
Default
Stochastic %K
Allowed range
%K / CCI / MA Gap
Description
Selects the type of calculation.

Base period

English item name
Oscillator Period (%K, CCI)
Input name
InpOscPeriod
Default
1
Allowed range
1 to 500 (2 to 500 for CCI)
Description
Used with %K and CCI. When switching to CCI, it must be changed from the default of 1.

%K summation period

English item name
Stochastic Slowing
Input name
InpSlowing
Default
3
Allowed range
1〜500
Description
The number of bars over which the %K numerator and denominator are summed. Not used with the other bases.

Short EMA period

English item name
Fast EMA Period (MA Gap)
Input name
InpFastPeriod
Default
5
Allowed range
1 to 500, less than Slow
Description
Used with MA Gap.

Long EMA period

English item name
Slow EMA Period (MA Gap)
Input name
InpSlowPeriod
Default
200
Allowed range
2 to 500, greater than Fast
Description
Used with MA Gap.

Calculation price

English item name
Applied Price (CCI, MA Gap)
Input name
InpPrice
Default
Close
Allowed range
Close / Open / High / Low / Median / Typical / Weighted
Description
Used with CCI and MA Gap. %K uses the close, high and low directly.

Additional average period

English item name
MA Period (0 = off)
Input name
InpMAPeriod
Default
0
Allowed range
0〜500
Description
0 hides it. With 1, it has the same value as the base line and overlaps it.

Additional average method

English item name
MA Method
Input name
InpMAMethod
Default
SMA
Allowed range
SMA / EMA / SMMA / LWMA
Description
The method of the band center line does not change.

Band period

English item name
Bands Period
Input name
InpBandsPeriod
Default
10
Allowed range
2〜500
Description
The number of bars used to find the average and population standard deviation of the base value.

Band width

English item name
Bands Width (x deviation)
Input name
InpBandsWidth
Default
2
Allowed range
Finite value 0.1 to 10
Description
The multiplier applied to the population standard deviation.
8

Usage specifications

Handling of a range of 0

With %K, the value is 100 in a window where the sum of ranges over Slowing bars is 0. Even if only the current bar's range is 0, this rule does not apply unless the summed window is 0.

Flat values and the band

If the same base value continues for the band period, the upper, lower and center lines overlap. When %K's zero range continues they overlap at 100, and in a flat CCI window at 0. When movement resumes, values may change significantly.

Forming bar

The latest base, average and band change during the bar. This product has no marks or notifications.

Effect of the start

Both EMAs of MA Gap depend on the start of the history, and the effect extends to its band and to the additional average of any method. For other bases too, EMA/SMMA additional averages depend on the start. The same values are not guaranteed when more history is loaded.

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 appears after switching to CCI

It does not start while Oscillator Period is still 1. Set it to 2 or more.

Rejected even for unused settings

The periods and methods of unused bases are also checked for range. Check all inputs, including Fast < Slow, and refer to the English diagnostics in the Experts tab.

The window name is the same but the lines differ

Applied Price, unused items and some fine digits of the width cannot be distinguished from the window name alone. Check them in the Inputs tab.

0 is displayed / there is no line

Before the first valid value there is no line, and the header may show 0. To distinguish it from a calculated 0, also check the required number of 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

Start of drawing

Counting the oldest bar as bar 1, %K starts at bar Oscillator Period + Slowing − 1, CCI at bar Oscillator Period, and MA Gap at bar 1. The additional average starts on the same bar as the base for EMA, and at bar base start + MA Period − 1 for other methods. The bands start at bar base start + Bands Period − 1.

Scale and levels

The %K base is 0 to 100; CCI is theoretically within ±n/0.03 depending on the period n; MA Gap is a price difference. The bands also go outside the range of the base. The silver level line is 50 for %K and 0 for the others.

Band definition

Center = simple average of the base over the last p bars. σ = √(sum of squared deviations ÷ p). Upper/lower = center ± width × σ. To convert a width w for the sample standard deviation to the same width, use w × √(p ÷ (p − 1)) on the population standard deviation side.

Window name and values

In the example, %K 1/3 is period 1 and Slowing 3, off means no additional average, and 10 x 2 is band period 10 and width 2. The header values are in the order base, additional average (when enabled), and the 3 bands.