Mark timing
The arrow is on the confirming bar, not the peak bar. Its height is the indicator value at the peak, so it can be away from the indicator line at that time.
Compares oscillator peaks and troughs, and the price highs and lows of those bars, with earlier peaks and troughs. Regular and hidden divergences are recorded as marks in the separate window at the bar where the peak was confirmed.
Mark timingThe arrow is on the confirming bar, not the peak bar. Its height is the indicator value at the peak, so it can be away from the indicator line at that time.
4 color categoriesRegular bearish is Crimson, hidden bearish is DarkOrange, regular bullish is SeaGreen, and hidden bullish is MediumTurquoise.
Provisional while formingMarks change until the latest confirming bar closes. There is no input to show closed bars only.


The published images are display examples from before the brand display was added. The product has display settings for the brand text and QR code, but the screen with the brand display has not yet been verified. The timeframe shown in the image does not indicate how often this appears on that timeframe in practice. Marks at the edges may be cut off outside the screen.
Oscillator = OsMA、Fast EMA (OsMA, MACD) = 12、Slow EMA (OsMA, MACD) = 26、Signal SMA (OsMA) = 9、RSI Period = 14、Stochastic %K Period = 5、Stochastic Slowing = 3、Peak Rule = Recent Local Peak、Left Bars (Zero-Cross Waves) = 2、Right Bars (Zero-Cross Waves) = 1、Minimum Peak Size (Zero-Cross Waves) = 0、Show Hidden Divergence = true。
The 4 brand display items are not included in the capture.
The arrow is on the confirming bar, not the peak bar. Its height is the indicator value at the peak, so it can be away from the indicator line at that time.
Regular bearish is Crimson, hidden bearish is DarkOrange, regular bullish is SeaGreen, and hidden bullish is MediumTurquoise.
Marks change until the latest confirming bar closes. There is no input to show closed bars only.
Compares oscillator peaks and troughs, and the price highs and lows of those bars, with earlier peaks and troughs. Regular and hidden divergences are recorded as marks in the separate window at the bar where the peak was confirmed.
In the high comparison, a falling indicator peak with a rising price high is regular bearish, and the reverse is hidden bearish. In the low comparison, a rising indicator trough with a falling price low is regular bullish, and the reverse is hidden bullish. No mark is placed when they are equal.
Detects peaks and troughs that are strictly higher or lower than all of the specified number of bars on the left and right. A candidate that exceeds ±Size and is more extreme than anything so far within the wave is compared with the extreme of the previous wave. For equal extremes, the newer candidate is kept.
Confirms peaks and troughs with 1 bar on the right and 1 bar on the left. If there is a more extreme value before the opposite sign is reached on the older side, the candidate is rejected. It is compared with the first local peak or trough that is at least 5 bars older. The Left, Right and Size inputs are not used.
OsMA is the close MACD − its SMA, and MACD is the difference of the close EMAs. RSI and Stochastic have 50 subtracted to center them on 0. Stochastic uses the high/low method, and a flat denominator gives 50 (0 after centering).
The arrow is on the confirming bar, not the peak bar. Its height is the indicator value at the peak, so it can be away from the indicator line at that time.
Use the same symbol, timeframe and history, and first change only one input. Use separate charts for comparison, and check the Mode and vertical axis of each screen.
If the arrows are matched to the price peak bars, the times are offset. Take the number of confirming bars on the right into account, and read the peak bar and the mark bar separately.
This display alone does not decide whether to trade. The colors, lines and arrows represent the calculation conditions in this manual; they are not a forecast of future price movement or an instruction to buy or sell.
At first, do not change the inputs; cross-check the colors and display location against the default screen above.
The value of the latest forming bar changes. There is no Closed Bars Only input. Read it separately from bars after they close.
Peak Rule: Zero-Cross Waves → Recent Local Peak. The comparison images may include more than one change.
The angle of lines and visible differences change with the screen zoom. Check the settings together with the price scale and the vertical axis of the separate window.
| ZIP contents | Location / role |
|---|---|
TRI_Oscillator_Divergence_Marks.ex5 | MQL5/Indicators in MT5. Only 1 item: the indicator itself. |
The manual opens on the product's own page on the site. The ZIP does not include the manual or source code. It is for MT5 only and cannot be used in MT4. The site edition has no account authentication or license file settings.
Prepare the extracted EX5. Do not place it while it is still compressed.
Place the EX5 in MQL5/Indicators via 'File → Open Data Folder'.
Refresh the Navigator or restart the terminal, and apply it to the target chart. DLL permission is not required.
Change the settings or remove it from the chart's 'Indicators List'. Enabling automated trading is not required.
There are 16 items in total: 12 product-specific items and 4 brand display items. English names are based on the input definitions. Enter numbers in half-width characters. Keep inputs that the mode does not use within range as well.
InpOscInpFastInpSlowInpSignalInpRsiPeriodInpStochKInpStochSlowingInpRuleInpLeftInpRightInpSensitivityInpShowHiddenInpTriBrandShowInpTriBrandCornerInpTriBrandXInpTriBrandYThe value of the latest forming bar changes. There is no Closed Bars Only input. Read it separately from bars after they close.
Settings changes, additions to or corrections of the history, and reloading redo the calculation. This is not a guarantee that "closed bars never change under any circumstances".
A common display is shared among products of the same medium on the same chart. If several are loaded, the settings of the registration that enabled the display first are used, so changing one may not change the appearance.
This product does not place orders or trade automatically. It does not guarantee accuracy as a trading signal or profits.
If the arrows are matched to the price peak bars, the times are offset. Take the number of confirming bars on the right into account, and read the peak bar and the mark bar separately.
Check whether the required number of history bars is available, whether the forming bar is hidden, and the input ranges and mode. Also check the terminal's Experts tab for input errors.
Check the price feed and the connection status. Changing settings for an unused mode does not change the display.
The appearance changes with the symbol, history, timeframe, inputs and scale. Even when compared with the full-size image, the marks are not necessarily at the same positions or of the same count.
Differences in the initial values of EMA and RSI or in the history can change the zero crossings and the peaks adopted, and differences may remain in later marks. It does not reproduce all signals of other indicators.
Read only marks whose confirming bar has closed as final. There are no notifications, no object lines connecting price and indicator, and no trade orders.
0.000000 may appear for the 4 mark series in the window heading. The 0 is not a value of divergence strength.
The published images and values were checked with the product before the brand display was added. The screen display of the product with the brand display has not yet been verified. Whether the values match other indicators with the same name, the Data Window display, and behavior with long histories or with symbols that have different price digits have not been verified.
Median = (high + low)/2, Typical = (high + low + close)/3, Weighted = (high + low + close×2)/4. The unit of periods is the number of chart bars.