Check the base
The default is %K. When switching to CCI, also set Oscillator Period to 2 or more.
Compares the base value, an average line and a dispersion band in the same window.
Blue lineThe calculated value selected from %K, CCI or MA Gap. Changing the type also changes the unit.
3 gray linesThe simple average of the blue line and the dispersion around it.
Orange average lineCan be shown additionally. It has a different period and method from the band center line.
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.
The default is %K. When switching to CCI, also set Oscillator Period to 2 or more.
Blue = base, orange = additional average, gray = upper, middle and lower band.
The %K bands also go outside 0 to 100. CCI and MA Gap are on different scales.
The bands show the dispersion of recent calculated values. They do not indicate a price target or a future range.
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.
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.
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 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.
Check the blue %K, the gray bands and the 50 level line.
Set MA Period to 1 or more and distinguish the orange line from the gray center line.
For CCI, use a period of 2 or more. For MA Gap, make Slow greater than Fast.
Read the base, average and bands in the window name, and check inputs not shown there in the Inputs tab.
| Included file | Purpose / location |
|---|---|
| TRI_Oscillator_Bands.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 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.
InpBaseInpOscPeriodInpSlowingInpFastPeriodInpSlowPeriodInpPriceInpMAPeriodInpMAMethodInpBandsPeriodInpBandsWidthWith %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.
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.
The latest base, average and band change during the bar. This product has no marks or notifications.
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.
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.
It does not start while Oscillator Period is still 1. Set it to 2 or more.
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.
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.
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.
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.
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.
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.
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.