Roles of the colors
Gold is Min-Step Position and blue is Mid-Step Position. The colors distinguish the series and do not mean rising or falling. The header is also in this order.
Builds 3 types of stepped references from the price range and displays their relative positions as 2 lines or as difference bars. Closed-bar cross marks and notifications are optional.
2 linesGold is the minimum-width reference and blue is the middle-width reference, each converted relative to the band of the maximum-width side.
0, 0.5 and 1References corresponding to the bottom, middle and top of the band. They are not upper or lower limits of the value.
Marks and notificationsRecords a swap in the relative position of the 2 lines on a closed bar. It is not a function that shows orders or positions held.
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.
Gold is Min-Step Position and blue is Mid-Step Position. The colors distinguish the series and do not mean rising or falling. The header is also in this order.
Position Difference in Difference is the gold value − the blue value. Green for 0 or above, red for below 0. The header shows only the difference, and the mark values are not shown. The only auxiliary line is 0.
Light blue when gold moves above blue, magenta when it moves below. They are drawn only on closed bars.
Compares stepped references built from 3 different widths, using the same band as the yardstick.
WATR is high − low weighted more heavily for newer bars, and ATR is the simple average of True Range, which also includes the difference from the previous close. Changing the method changes the values, but ATR is not always smaller.
The factor is applied to the minimum and maximum of the price range within Lookback and to their middle value. A stepped reference is built from each, and the other 2 are converted with a band centered on the maximum-width reference.
0 = bottom of the maximum-width band, 0.5 = middle, 1 = top. The gold and blue lines can go outside that band. Position is a relative position and does not mean orders or positions held.
With Period as P and Lookback as L, the first candidate is bar P + L − 1 for WATR and bar P + L for ATR. The default is bar 509, and the change example bar 314. No value is drawn on bars where the width used as the denominator is 0.
On bars where the 2 lines are equal or cannot be calculated, the previous side is kept. A closed bar that then moves to the opposite side is a cross. Becoming equal alone produces neither a mark nor a notification.
Check the gold and blue series and the 0, 0.5 and 1 references.
A long Lookback requires many bars before drawing starts.
The 5 items method, period, factor, Lookback and marks are changed.
Marks are effective with Two Lines. Notifications are turned ON separately.
| Included file | Purpose / location |
|---|---|
| TRI_Step_Band_Position.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 display name and the input name in the code are shown together.
InpStepSourceInpPeriodInpMultiplierInpPriceBasisInpLookbackInpDisplayInpShowCrossMarksInpAlertCrossWATR's weights are divided by Period, not by their sum. This differs from a normal weighted average. ATR, on the other hand, also includes gaps from the previous close, so which of the two is larger depends on the price path.
In the 2 images shown, the top of the automatic scale is close to 1, and the top value and the 1.0 value overlap. Use them as examples for viewing the shape of the lines and the marks. Check the exact scale on the chart you are using.
Both marks and notifications are records of crossing conditions that have already been met. Values of the forming bar change, and there is no guarantee that they stay unchanged when recalculated after past history changes.
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 Two Lines, Show Cross Marks=true and the closed-bar cross conditions. Marks are not drawn with Difference.
There may be no value because of insufficient history or a width of 0. Check whether the line exists and the required number of bars.
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.
WATR = Σ((high − low) × weight) ÷ P. The weights are 1 + 1/P, … from the oldest bar, and 2 on the newest bar. ATR is the P-bar simple average of max(high − low, |high − previous close|, |low − previous close|).
For each width s, creates an upper candidate a+2s and a lower candidate b−2s. With Close, a=b=close; with High Low, a=low, b=high. If the close goes above the previous upper line, the state becomes up; if it goes below the previous lower line, the state becomes down. In the up state the lower line is not lowered, and in the down state the upper line is not raised. The center is lower line+s in the up state and upper line−s in the down state.
Let Lx be the center of the widest-width line and sx its width, with bottom B=Lx−sx and top T=Lx+sx. Gold=(center of the narrowest-width line−B)÷(T−B), blue=(center of the middle-width line−B)÷(T−B). If T−B is not positive, neither is drawn.
Keeps the sign of the last gold−blue value that was not 0 and draws a mark on the closed bar where the sign reverses. Notifications cover the same crossovers, but no notifications for past bars are sent right after initialization.