Boundary
0 for MA Gap, 50 for the other 3 types.
Splits the base value above and below a boundary, and updates each average line only with the bars on its own side.
Choose the baseChoose from RSI, Cascade Smoothed RSI, Stochastic %K or MA Gap.
The side lines update separatelyOrange exponentially averages only the upper-side values, and purple only the lower-side values.
Colors compare on the same barGreen is a value above the upper line, red is below the lower line, and gray is neither.
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.
0 for MA Gap, 50 for the other 3 types.
It is not up/down versus the previous bar, but greater/smaller than the side lines on the same bar.
While the base is on the opposite side, that line is not updated.
Side Average Period is not a period that averages all bars continuously.
RSI, Cascade Smoothed RSI and Stochastic %K are drawn as lines; MA Gap draws the difference between a fast and a slow price average as bars. For the MA Gap average, choose SMA or EMA.
The exponential average is updated with coefficient 2/(Side Average Period + 1) only on bars on that side. On bars on the opposite side, the previous value is kept.
For the 0 to 100 types, exactly 50 keeps both side lines. For MA Gap, an exact 0 updates as the upper side.
Green if the base is greater than the upper line on the same bar, red if smaller than the lower line, gray otherwise. Equal to a line is also gray.
| Base | Main inputs used | Boundary / type |
|---|---|---|
| MA Gap | Gap Average Method、Fast/Slow、Applied Price | 0 / bars |
| RSI / Cascade | Oscillator Period、Applied Price | 50 / line |
| Stochastic %K | Oscillator Period、Stochastic Slowing | 50 / line |
Side Average Period is used with all bases. Unused inputs are also checked for range and combination.
The window name shows the type: RSI, Cascade, Stochastic or MA Gap.
Each base needs different inputs. Keep unused inputs within the allowed range as well.
Distinguish the orange upper-side average, the purple lower-side average and the silver boundary.
MA Gap is bars; the other bases are lines. If the type differs from what you intended, remove this product and attach it again with the selected settings.
| Included file | Purpose / location |
|---|---|
| TRI_Boundary_Side_Averages.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 8 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.
InpBaseInpGapMethodInpFastPeriodInpSlowPeriodInpOscPeriodInpSlowingInpAveragePeriodInpPriceFor 0 to 100 type bases, the side lines use 50 as their initial value and update from the bar of the base's first value. With MA Gap, a side line is not drawn until a value for that side first appears. One side alone may not appear for a long time.
If all high-low ranges in the window are 0, %K is 100. Until the upper line catches up to 100 it is green, and when they reach the same value it is gray. Do not read 100 or the color as the strength of price change.
RSI keeps its last value. Cascade keeps moving for a while after the stop and may reach 0 or 100; if the smoothed size of change is nearly 0, it is 50. Values and colors during the stop and for a while after it carry no meaning about price direction.
Values and colors of the forming bar change. The vertical axis is automatic, and the range is not fixed even for 0 to 100 types. There are no mark or notification functions.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
Displays, marks and notifications are records of calculation results. They do not direct trading decisions and do not guarantee future price movements.
With MA Gap, values on that side may not have appeared yet. Do not judge from a 0 in the header alone that the line is at the boundary.
Check the required history. Cascade restarts its preparation when the price does not move from the start of the history, so the first value can be delayed.
Check them in the Inputs tab of the properties. Unused inputs are also checked, so even with RSI, it does not start if Fast and Slow have the same value.
MA Gap is bars; the others are lines. Remove the indicator, attach it again, and check the type and inputs.
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.
Count the first bar as bar 1. For MA Gap, SMA starts at bar Slow Period and EMA at bar 1 (the first difference is 0). RSI starts at bar Oscillator Period + 1. %K starts at bar Oscillator Period + Stochastic Slowing − 1. Cascade starts at bar max(Oscillator Period−1,5) + 1 at the earliest, but is delayed when its preparation restarts.
A 0 in MA Gap is the upper side, but if a very small positive or negative difference remains from rounding in the calculation, it is classified to the side of that sign. A number or bar height that looks like 0 on screen is not necessarily an exact 0.
The MA Gap EMA uses the oldest price as its initial value. The first section is affected by how it starts. Because the side lines stop while on the opposite side, that influence can remain even at the latest bar.
There are 3 values: the base, the upper side line and the lower side line. MA Gap uses the price digits + 1 digit; the others use 2 decimal places. On bars where the required values are not available yet, do not distinguish a displayed 0 from an actual 0 by the header alone.