Value of the blue line
The value of an EMA applied over RSI. With smoothing 1, the RSI value is used as it is.
Displays a blue line that smooths RSI and an orange trailing line built from its change width. A notification when the line crosses a chosen level on a closed bar is also available.
Look at the blue lineIt is the smoothed RSI value. It is not the price itself.
Look at the orange dotted lineIt is a trailing level based on the change width of the blue line. It is not a function that modifies orders.
Notification is a separate conditionIt records a cross of the blue line and Alert Level. It is not a notification of a cross between the blue line and the orange 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 value of an EMA applied over RSI. With smoothing 1, the RSI value is used as it is.
Because the update direction is restricted by the position of the main line relative to the previous trailing line, the line can continue horizontally.
The gray 50 line is fixed. Changing the notification level does not move the 50 line.
Compares, in one window, the RSI level and a trailing level calculated from its change width.
RSI is built from the averages of the upward and downward changes of the close, and is further smoothed with EMA. The main line is in the range 0 to 100. The window header shows the latest bar's values of the main line, then the trailing line. The notification level is not shown in the window name.
The absolute difference of the main line from the previous bar is smoothed with 2 stages of EMA and multiplied by the width factor. Candidates obtained by adding and subtracting that width above and below the main line are updated according to their relationship with the previous trailing line. The trailing line can go outside 0 to 100.
It means a trailing level in the calculation. It is not a function that changes price levels or orders, or sets protection. Changing the width factor does not necessarily change the number of crosses in a fixed direction.
With RSI Period as n, the main line starts at bar n + 1 of the history and the trailing line at bar n + 2. With the defaults, these are bar 15 / bar 16, and in the change example bar 22 / bar 23. This is where calculation starts from the initial values; it does not mean the values have become sufficiently stable.
Distinguish the solid blue line, the orange dotted line and the gray 50 line.
Check the 3 items in the comparison section, and after changing them, wait for the history to be recalculated.
Set Alert on Closed-Bar Level Cross to true and decide Alert Level.
The latest bar is still forming. Notifications target the closed bar immediately before, at the moment a new bar arrives.
| Included file | Purpose / location |
|---|---|
| TRI_RSI_Trailing_Level.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 5 inputs. Change them on the Inputs tab of the properties. The English display name and the input name in the code are shown together.
InpRSIPeriodInpSmoothingPeriodInpWidthFactorInpAlertCrossInpAlertLevelIt keeps track of whether the main line is above or below the specified level. Even with bars of equal value in between, the target is the closed bar that has moved to the opposite side. At level 0 the main line does not go below it, so no crossing notification occurs.
Within the cross-check range of periods 14 and 2 on bars where the average decline was not 0, the main line with smoothing 1 and the standard RSI of the close had the same values. This does not mean they are identical for all settings and histories. When the average decline is 0 and the average rise is also 0, this product shows 50; if there is a rise, it shows 100. This may differ from the standard branching.
On a price update of a new bar, it evaluates the latest closed bar. Right after attaching or changing settings, it only records the time and does not send notifications for past conditions in bulk. Even if several bars advance, it does not replay notifications for every bar. The time in the message is the start time of the target bar.
Notifications are English pop-ups. There is no email, push or custom sound file playback, but a sound may play depending on the notification settings in MT5. The notification time cannot be guaranteed while no price updates arrive.
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, the separate window header may show 0 at the display precision (0.00 for RSI and MACD, 0.0000 for the transform bars, 0.000 for the step band). Check whether the line exists together with the number of bars required. 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.
Displays, marks and notifications are records of calculation results. They do not direct trading decisions and do not guarantee future price movements.
Check whether it is set to true, whether the line moved to the opposite side of the specified level, and whether the indicator has only just been attached. A cross of the blue line and the orange line alone does not trigger a notification.
The trailing line is calculated by adding or subtracting a width to the main line. It does not have the same upper and lower limits as the main line.
Check where drawing starts in Chapter 3 and the input ranges in Chapter 7. Depending on the settings, a long history is required. Also distinguish valid lines from lines that have been hidden.
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.
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.
The upward and downward averages are built from the first n close-to-close changes; after that, the sum of the previous average × (n − 1) and the current change is divided by n. The main line EMA uses the first RSI as its initial value.
w = Width Factor × EMA(EMA(|main line − previous main line|)). Both of the 2 stages use period 2n − 1. The width is calculated from the first change of the main line.
If the main line is below the previous trailing line, main line + w is the candidate, and if the previous main line was also below, the line is not raised above the previous trailing line. If it is above, main line − w is the candidate, and if the previous main line was also above, the line is not lowered below the previous trailing line. If they are equal, the previous trailing line is kept. At first, it is main line − w if the main line > 0, and 0 otherwise.