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

Stochastic Momentum Index

Smooths how far the close is from the midpoint of the period's high and low in 2 stages, separately from the range, and turns it into a ratio.

Indicator name: Stochastic Momentum IndexMetaTrader 5Separate window

Smooth the distance and the range separately

The ratio is taken after smoothingClose − high-low midpoint / high − lowDistance and range each smoothed in 2 stages200 × smoothed distance ÷ smoothed range → SMI
Schematic diagram of how to read it. This is not an actual terminal screen.
1

The blue line is SMIIt is the distance from the midpoint compared with the smoothed range.

2

The orange line is the average lineThe calculated SMI is averaged further with the same method. It can be hidden with a period of 0.

3

Read around 0 or 50The default is −100 to 100 with center 0. Switching to 0 to 100 makes the center 50.

2-stage smoothing before the ratioFixed vertical axisAverage line optional
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
High-low period
InpRangePeriod
13 → 10
First-stage smoothing period
InpFirstPeriod
25 → 3
Second-stage smoothing period
InpSecondPeriod
2 → 5
SMI average line period
InpAveragePeriod
5 → 3

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 settingsInpRangePeriod = 13 / InpFirstPeriod = 25 / InpSecondPeriod = 2 / InpAveragePeriod = 5
Stochastic Momentum Index default settings
Range 13, First 25, Second 2, Average 5, EMA. The vertical axis is −100 to 100.
View the screen in detail at full size
Stochastic Momentum Index default settings (actual size)
Settings change exampleInpRangePeriod = 10 / InpFirstPeriod = 3 / InpSecondPeriod = 5 / InpAveragePeriod = 3
Stochastic Momentum Index settings change example
Changed to Range 10, First 3, Second 5 and Average 3. The method and scale stay at the defaults, so you can compare the split of the 2 stage periods and the shape of the lines.
View the screen in detail at full size
Stochastic Momentum Index 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

What decides positive or negative

It is the sign of the smoothed "close − high-low midpoint". It is not a value that directly shows the location of the current close alone.

The 2 stage periods

First is the first smoothing of the distance and the range, and Second is the smoothing of that result. Average is applied to SMI itself.

Caution about a range of 0

The condition for the neutral value is that the smoothed range is 0 or less. It does not always become 0 just because the price stopped moving.

3

What it measures

The 2 series of distance and range are smoothed with the same method, and the ratio is taken at the end.

Distance calculation

The highest high and lowest low over Range Period bars including the current bar are found, and close − (highest high + lowest low) ÷ 2 is used as the distance.

Range calculation

The highest high − lowest low over the same period is the range. The distance and the range are each smoothed with First, then with Second.

SMI and the average line

Smoothed distance ÷ smoothed range × 200 is SMI. The result is kept within −100 to 100. The average line is this SMI smoothed further with the same method.

The 2 scales

The default is −100 to 100, with level lines at −50, 0 and 50. On the 0 to 100 scale, the value is converted to (SMI + 100) ÷ 2, and the level lines are 25, 50 and 75. The vertical axis is fixed.

Behavior in flat sections

If the smoothed range is 0 or less, SMI is 0 (50 on the 0 to 100 scale). With SMA and LWMA, it becomes the neutral value when the required calculation window is replaced by a flat section. With EMA and SMMA, past ranges remain, and a non-zero SMI may continue even in a flat section.

Required history

SMI starts from bar Range + First + Second − 2, and the average line from that number plus Average − 1 bars. EMA also starts displaying at the same bar. With the defaults, SMI starts at bar 38 and the average line at bar 42. In both cases, the oldest loaded bar is counted as bar 1.

4

Situations for reading the display

SMI is not 0 even though the price is flat

Indicator
With EMA and SMMA, past distances and ranges remain.
Cross-check
Check the method and the First / Second periods.
Check
Understand that a non-zero ratio can also continue after changing for a while.
Caution
It is not a function that holds the value from just before the flat section as it is.

0 became 50 after changing the scale

Indicator
It is the same calculated result converted to a different scale.
Cross-check
Check Output Scale.
Check
Confirm that the level lines also change from −50/0/50 to 25/50/75.
Caution
Do not compare values on the 2 scales without converting them.

Blue and orange start at different positions

Indicator
The average line requires additional history.
Cross-check
Check Average Period and the number of bars where drawing starts.
Check
Setting 0 hides only the average line.
Caution
Do not mistake 0.00 in the header before the start for a calculated neutral value.
5

Steps for checking the display

1

Check the 2 lines with the default settings

Check the blue SMI, the orange average line and the −50, 0 and 50 levels.

2

Distinguish the 2 stage periods

Read Range, First and Second in that order. First and Second are common to both the distance and the range.

3

Compare with the change example

Compare the changes to the 4 items in Chapter 1 with the shape of the lines. It does not mean that short periods are recommended values.

4

Adjust the average line and the scale

Setting Average Period to 0 removes the average line. Output Scale converts the value to 0 to 100.

6

Installation and checking the package contents

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

High-low period

Name shown on screen
Range Period
Input name
InpRangePeriod
Default
13
Allowed range
1〜1000
Description
Determines the range of highs and lows including the current bar.

First-stage smoothing period

Name shown on screen
First Smoothing Period
Input name
InpFirstPeriod
Default
25
Allowed range
1〜1000
Description
The first smoothing period applied to both the distance and the range.

Second-stage smoothing period

Name shown on screen
Second Smoothing Period
Input name
InpSecondPeriod
Default
2
Allowed range
1〜1000
Description
The period applied further to the result of the first stage.

SMI average line period

Name shown on screen
Average Period (0 = off)
Input name
InpAveragePeriod
Default
5
Allowed range
0〜1000
Description
At 0, the average line is hidden. At 1 or more, SMI is averaged further.

Smoothing method

Name shown on screen
Smoothing Method
Input name
InpMethod
Default
EMA
Allowed range
SMA / EMA / SMMA / LWMA
Description
A common method is used for the 2 stages of distance and range and for the SMI average line.

Output scale

Name shown on screen
Output Scale
Input name
InpScale
Default
-100 to 100
Allowed range
-100 to 100 / 0 to 100
Description
The default center is 0. Changing to 0 to 100 makes the center 50.
8

Usage specifications

Order of the ratio

It is not a method that first calculates distance ÷ range and then averages in two stages. Its calculation order also differs from Smoothed Stochastic, so even with matching periods the lines are not necessarily the same.

Conditions for a zero range

Even with EMA or SMMA, if the history is completely flat from the start, the value becomes neutral. If First and Second are both 1, no past values are carried in the smoothing, and a range of 0 gives the neutral value. With general settings, the decision is based on the denominator after smoothing.

Influence of the past

With EMA and SMMA, the initial value of the history also affects later bars. When the loaded history range changes, the values at the same time do not necessarily match exactly.

The forming bar changes

On the latest bar, values and colors change with price updates. If the timeframe, the start of the history or past prices change, the recalculated values may also change.

Do not judge by 0.00 in the header alone

Even for a line that is not drawn because the required history is insufficient, 0.00 may appear in the separate window's header. Check whether the line is present together with the required number of bars. Values of lines hidden by input are not shown in the header either.

Keep unused inputs within range too

Periods of unselected methods and similar inputs are also subject to the input range check. If out of range, it does not start, and a 1-line reason in English appears in the 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

This product is for displaying calculation results on the screen. It does not guarantee future price movement.

9

Troubleshooting and usage notes

No lines appear

Check where drawing starts in Chapter 3 and the input ranges in Chapter 7. Depending on the settings, a long history is required. A period of 0 for an average line or the extra line is a setting that hides it.

The settings are not accepted

Check the reason on the Experts tab in MT5. Set back within the allowed range not only the inputs of the method being displayed but also the inputs that are not in use.

The line does not look smooth

Check the line at actual size. The impression of the shape also changes with the screen zoom and the scale of the vertical axis.

Only the average line is not visible

Check whether Average Period is not 0 and whether there are enough bars for the average line. With period 1, it has the same value as SMI, so the lines can overlap.

It does not return to neutral even with flat prices

It is not necessarily a malfunction. It is the property of EMA and SMMA that past distances and ranges remain. Check the method and periods, and the explanation in Chapter 3.

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 for the 2-stage smoothing

With HH and LL as the high and low within the period, d = C − (HH + LL) ÷ 2 and r = HH − LL. d and r are each smoothed with method m over the First period, then over the Second period. If the denominator is positive, the value is 200 × smoothed d ÷ smoothed r; otherwise it is 0. The result is kept within −100 to 100.

Averaging methods

SMA is a simple average, and LWMA gives larger weights to newer bars. EMA uses the first input as the initial value and updates with the coefficient 2 ÷ (n + 1). SMMA starts from the SMA of the first n bars and then updates as (previous value × (n − 1) + current value) ÷ n.

Start of calculation and start of display

The internal EMA calculation starts early, but the display waits until bar Range + First + Second − 2. The SMI average line is also drawn after waiting Average − 1 bars. Sections on the oldest side where no value exists are not drawn.

Scale and zero denominator

The conversion to 0 to 100 is (v + 100) ÷ 2. The neutral value 0 moves to 50. If past positive ranges remain in the averaging even when the range is 0, the division continues and the ratio is not necessarily neutral.

Roles of the lines

The blue line is SMI and the orange dashed line is SMI Average. An average line turned off with period 0 does not appear in the header either. There is no notification function.