MT5 indicators← Adaptive Stochastic 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

Adaptive Stochastic

Changes the search period by the ratio of short-term to long-term ranges, and shows from −100 to +100 where the close lies within the window. It is not the same calculation as the MT5 standard Stochastic.

Indicator name: Adaptive StochasticMetaTrader 5Separate window below the chart

Read the line's position and that bar's search period separately

Position of the close within the window × variable period+1000−100The period changes bar by bar
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Height of the blue lineThe position calculated from closes only, shown from −100 to +100.

2

5 dotted lines0 and the inner and outer guide lines. The defaults are ±75 and ±90.

3

Check the period tooThe search period changes bar by bar. The values can be checked in the Data Window.

Uses close-only highs and lowsStretches with the short/long ratioHorizontal lines are display guides
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 period
InpBasePeriod
10 → 20
Raise the ratio to the 2nd power
InpQuadratic
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 settingsInpBasePeriod = 10 / InpQuadratic = true
Adaptive Stochastic default settings
Default: base period 10, ratio raised to the power of 2. Read the height of the line and the period for that bar separately.
View the screen in detail at full size
Adaptive Stochastic default settings (full size)
Settings change exampleInpBasePeriod = 20 / InpQuadratic = false
Adaptive Stochastic settings change example
An example with a base period of 20 and the ratio not raised to the 2nd power. The short term 7, long term 49 and the horizontal line settings are not changed.
View the screen in detail at full size
Adaptive Stochastic settings change example (full size)

Example shown: 1-minute chart (M1). This is an example to explain the display. The settings change example is not a recommended value. Details can be checked in the full-size view.

2

How to read it in 30 seconds

Look at the height

The sign represents the position of the close within the window. Positive does not necessarily mean the price is rising, and negative does not necessarily mean it is falling.

Look at the period

The larger the short-term TR average is relative to the long-term one, the longer the search period becomes.

Cross-check with the guide lines

Read the position relative to 0, ±75 and ±90. Reaching a guide line is not a trading instruction.

3

What it measures

Using each bar's search period, it calculates a position indicator that combines 4 close windows.

How the period is determined

The short-term TR average ÷ long-term TR average is calculated, and by default that ratio is raised to the 2nd power and multiplied by the base period. It is rounded to the nearest integer, with a minimum of 1 bar.

Position within the close windows

The maximum and minimum closes are found in 4 windows ending at that bar and the 3 bars before it. This is not a method that sets the top and bottom of the window from candle highs and lows.

Meaning of 0

The center that combines the positions of the windows is 0. However, 0 is also shown when the denominator is 0. With a period of 1, each window has a width of 0, so the value can be 0 even while the price is moving.

Display range

Valid calculated values are from −100 to +100. On bars where the period is long and the required history is insufficient, no value is drawn.

4

Situations for reading the display

The blue line is at a high position

Indicator
In each window, the close is toward the upper side.
Cross-check
Cross-check that bar's search period with the movement of the close.
Check
Compare with other bars, including the change in the period.
Caution
The same height does not necessarily mean the same search period.

The line lies along 0

Indicator
It is a value near the center, or a display caused by a denominator of 0.
Cross-check
Check in the Data Window whether the period has become 1.
Check
Read the value and the period as a set.
Caution
From 0 alone, you cannot conclude that the price is not moving.

The line is missing partway

Indicator
The history may be insufficient for the search period.
Cross-check
Check the long-term TR period and the actual search period.
Check
Add history and check the positions where the required number of bars is available.
Caution
Do not read bars that cannot be drawn as 0.
5

Steps for checking the display

1

Start from the 6 default inputs

Base 10, short term 7, long term 49, ratio raised to the 2nd power, inner 75 and outer 90.

2

Check the line and the guide lines

The blue line and 0, ±75 and ±90 appear in the separate window.

3

Cross-check the period

Read the value and the period for the same bar in the Data Window.

4

Compare with conditions separated

The change example changes 2 inputs. When comparing individual effects, change 1 input at a time.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Adaptive_Stochastic.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 6 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 period

Name shown on screen
Base Period
Input name
InpBasePeriod
Default
10
Allowed range
1〜200
Description
The base number of bars that the ratio is multiplied by. It is not the actual period of each bar itself.

Short-term TR average period

Name shown on screen
Fast ATR Period
Input name
InpFastAtr
Default
7
Allowed range
Integer from 1 to 999, smaller than the long term
Description
Used for the simple average of TR. Do not assume it equals the standard ATR.

Long-term TR average period

Name shown on screen
Slow ATR Period
Input name
InpSlowAtr
Default
49
Allowed range
Integer from 2 to 1000, larger than the short term
Description
If the long-term average is 0, the ratio is set to 1. It also affects where the initial display starts.

Raise the ratio to the 2nd power

Name shown on screen
Square the ATR Ratio
Input name
InpQuadratic
Default
true
Allowed range
true / false
Description
true multiplies by the ratio raised to the 2nd power; false multiplies by the ratio itself. The effect differs depending on whether the ratio is smaller or larger than 1.

Inner guide line

Name shown on screen
Inner Level
Input name
InpInnerLevel
Default
75
Allowed range
Integer from 1 to 99, smaller than the outer
Description
Draws guide lines at the same height on the positive and negative sides. It does not change the calculated values or the search period.

Outer guide line

Name shown on screen
Outer Level
Input name
InpOuterLevel
Default
90
Allowed range
Integer from 2 to 100, larger than the inner
Description
The outer guide lines on the positive and negative sides. It cannot be set to the same value as the inner.
8

Usage specifications

Initial display and required history

The period is displayed once the long-term TR period's worth of bars is available. The blue line additionally needs history of that bar's search period + 3 bars. By default, the blue line does not necessarily appear from the 49th bar.

Quiet sections and when movement resumes

If the short-term TR is 0, the period is 1. If the long-term TR also becomes 0, the period returns to the base value. Right after the range returns, the period may lengthen sharply.

Forming bar

On the forming bar, the search period and the blue line change together with the range and close. It is also recalculated when past history is added or corrected.

Amount of calculation

The larger the search period and the number of history bars, the more calculation is needed. When changing to large settings, wait for the display to update, and avoid excessive 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

Calculated values are stored in buffers and shown as lines and bars. It does not place trade orders or issue alerts. It does not guarantee profit or market direction.

9

Troubleshooting and usage notes

It does not start

It does not start if short term ≧ long term, inner ≧ outer, or an input is out of range. 1 line giving the reason in English appears in "Toolbox → Experts". The reason is not shown on the chart.

The upper and lower scale labels are close together

If the separate window is short, the labels for ±90 and ±100 come close together. Make the window taller or read the values in the Data Window.

Values differ from the standard product

The period is variable, and it uses close-only highs and lows and 4 windows. Agreement with the MT5 standard Stochastic is not assumed.

Slow response with a long period

This is not necessarily because the price change is small. Check the short/long range ratio together with the actual period.

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

TR and search period

TR is a width that includes high − low and the extension from the previous close. From the ratio f of the short-term and long-term simple TR averages, p = max(1, floor(base period × f² + 0.5)) is calculated. Without the 2nd power, f² is replaced by f. With a long-term average of 0, f = 1.

Blue line calculation

The bar's p is shared by the 4 windows, and from numerator = Σ(each close − minimum close of the window) and denominator = Σ(maximum close of the window − minimum), 200 × numerator ÷ denominator − 100 is shown. If the denominator is 0, it is 0.

Lines, values and guide lines

The blue line is RoyalBlue, solid, width 2. The period is a value only, and no line is drawn for it. The guide lines are Gray, dotted, at 0 and ±Inner Level and ±Outer Level. The vertical axis is −100 to +100.