Blue and orange
Blue is the smoothed price location, and orange is the average line obtained by further smoothing the blue series.
Smooths the location of price between the high and low of the period with the selected method. Separate smoothing can be selected for the main line and the average line.
Choose the price and periodUses the close or median against the high-low range, or a range of closes only.
Separate the 2 smoothing stagesThe method and period of the main line and the average line are separate inputs. Also distinguish them from Slowing.
Read the scaleThe scale is a conversion of the value. With Zero-Lag SMA and others, the value may exceed the range in the scale name.
Compares the default settings and a settings change example on a screen with only this product applied.
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.
Blue is the smoothed price location, and orange is the average line obtained by further smoothing the blue series.
Slowing is the sum of the price differences ÷ the sum of the ranges. Main Period is the period of the smoothing applied after that.
With LSMA, T3 and Zero-Lag SMA, the value can go outside the range. The vertical axis is not fixed.
Calculates the range and price location over a period that includes the current bar, and applies smoothing in order to the 2 displayed series.
High/Low range, Close uses the close within the range of highs and lows, and Median uses (high + low) ÷ 2 of that bar. Close range, Close uses the maximum and minimum of the closes only within the period.
For each bar, "price − lowest low up to that bar" and "highest high up to that bar − lowest low" are calculated, each is summed over Slowing bars, then one is divided by the other and multiplied by 100. It is not a simple average of each bar's ratio.
If the sum of the ranges over Slowing bars is 0, the value before smoothing is set to 100. This is a calculation convention for when there is no range; it does not mean the price is at the highest high. The smoothed line does not necessarily become 100 immediately either.
The main line is the smoothing of the price location, and the average line is the smoothing of the main line. The average line can be hidden with an average period of 0. The scale conversion is done after both calculations.
The value is converted to v for 0 to 100, v − 100 for %R, and 2v − 100 for −100 to 100. The level lines are, in that order, 20/50/80, −80/−50/−20 and −60/0/60. The scale name does not guarantee the upper or lower limit of the value.
The price location starts from bar Range Period + Slowing − 1. The additional bars for smoothing are period − 1 for SMA, LWMA and LSMA, 2 × (period − 1) for Zero-Lag SMA, and 0 for EMA, T3 and Recursive. The average line further adds the additional bars of its averaging method. With the defaults, the main line starts at bar 9 and the average line at bar 13.
The comparison is limited to the 3 settings below. Rounding differences in the calculation are possible. It does not mean that the default settings or other methods and periods are also identical.
| This product's settings | MT5 standard side |
|---|---|
| High/Low, Close, Range 14, Slowing 3, Main SMA 1, Average SMA 3, 0 to 100 | Stochastic: %K 14 / %D 3 / Slowing 3 / SMA / Low-High. Both lines. |
| Close range, Close, Range 14, Slowing 5, Main SMA 1, Average SMA 5, 0 to 100 | Stochastic: %K 14 / %D 5 / Slowing 5 / SMA / Close-Close. Both lines. |
| High/Low, Close, Range 14, Slowing 1, Main SMA 1, Average 0, %R | %R with period 14. Main line only. |
First, with 0 to 100, identify the blue line, the orange line and the 20/50/80 levels.
Read Range and Price, Range Period and Slowing.
Change Main Smoothing and Main Period, then change the Average side. Chapter 1 shows all the changed inputs.
Set Average Period to 0. The calculation of the main line does not change.
| Included file | Purpose / location |
|---|---|
| TRI_Smoothed_Stochastic.ex5 | The 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.
Extract the ex5 main file rather than leaving it in the compressed file.
In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.
Refresh the Navigator or restart MT5, and apply it to the target chart. Place only 1 instance of the same product on 1 chart.
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.
There are 9 inputs. Change them on the Inputs tab of the properties. The English display name and the input name in the code are shown together.
InpPriceModeInpRangePeriodInpSlowingInpMainMethodInpMainPeriodInpAverageMethodInpAveragePeriodInpT3FactorInpScaleLSMA, T3 (when the coefficient is greater than 0) and Zero-Lag SMA can exceed the reference range such as 0–100. The main lines of SMA, EMA, LWMA and Recursive stay within the reference range, but if a different method is used for the average line, only the average line may go out of range.
This is the name of the method 2×SMA−SMA(SMA). It is a calculation that reduces lag in responding to changes, but it does not eliminate lag entirely.
The first calculation uses 50, before scale conversion, as the previous value. This does not mean the initial display is always 50. For %R the initial reference of 50 corresponds to −50, and on a ±100 scale it corresponds to 0.
This product smooths the price position. The Stochastic Momentum Index smooths the distance and the range separately and then takes their ratio, so it is not the same calculation. Flat sections of the SMI also do not immediately reach the neutral value when EMA or SMMA history remains.
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.
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.
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.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
This product is for displaying calculation results on the screen. It does not guarantee future price movement.
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.
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.
Check the line at actual size. The impression of the shape also changes with the screen zoom and the scale of the vertical axis.
This product's default is Zero-Lag SMA. Compare with the full set of corresponding settings in Chapter 3, and do not consider them identical by matching only one 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.
HH and LL are the maximum and minimum over Range Period bars up to each bar. Σ(P − LL) ÷ Σ(HH − LL) × 100 over Slowing bars is the value before smoothing. If the denominator is 0, it is set to 100.
SMA is a simple average, and LWMA is an average that gives larger weights to newer values. EMA uses the first value as the initial value and updates with the coefficient 2 ÷ (period + 1). LSMA = 3 × LWMA − 2 × SMA.
With a = SMA_n(x) and aa = SMA_n(a), it is 2a − aa. It is applied to the main line and the average line separately. It is a different formula from Zero-Lag EMA.
y = (previous y × (n − 1) + x) ÷ n. Only for the first calculation, the previous y is set to 50. This rule applies to both the main line and the average line. There is no J line.
The period n is converted to n′ = 1 + 0.5 × (n − 1), and 6 stages of EMA are built with the coefficient 2 ÷ (n′ + 1). The initial value of each stage is the first input value. With b as T3 Factor, the output is −b³ × e6 + (3b² + 3b³) × e5 + (−6b² − 3b − 3b³) × e4 + (1 + 3b + 3b² + b³) × e3.
For EMA, T3 and Recursive, the effect of the start of the history remains. The T3 factor in the header is shown with 2 decimal places, so if you enter a finer value, check it in the input field. There is no notification function.