Read the ends of the range
The width of the upper and lower sides is set by Zone Percent.
Shows with colors whether the close is in the upper side, lower side or middle of a high-low range with a variable number of bars. An arrow is placed only on bars where the last upper / lower state switched.
Green and red barsGreen in the upper side, red in the lower side. In the middle, the product's bars are not drawn.
ArrowsNo arrow for the first state; an arrow is placed on the bar that switches from the remembered opposite side.
Forming barBy default arrows are limited to closed bars, but the bars are also shown on the forming bar.
Compares the default settings and a settings change example on a screen with only this product applied.
Example shown: 1-minute chart (M1). This is an example for explaining the display. The settings change example is not a recommended value. Details can be checked in the full-size view. Please also check the price scale of the main chart and the positions of the candlesticks.
The width of the upper and lower sides is set by Zone Percent.
Even without the product's color, the preceding upper / lower state is kept internally.
Show Bars and Show Switch can be switched separately.
Classifies the position of the close not with the high and low of a fixed number of bars but with a number of bars derived from the previous bar's ADX.
R = ceil(Range Factor ÷ max(previous bar's ADX, 1)). A smaller ADX makes the range longer.
Zone Percent % of the high-low difference forms the upper and lower bands. If the close is above the upper boundary it is green; if below the lower boundary it is red. A value equal to a boundary is treated as the middle.
In the middle, the last upper / lower side is kept. A change to the opposite side gives an arrow. No arrow is placed on the bar where the state is first decided.
The product's bar spans each bar's high to low. It is separate from the body of the original candlestick and its bullish / bearish colors.
Green is the upper side of the range, red is the lower side.
Compare the bar with an arrow and the non-middle state before it.
Confirm that Closed Bars Only affects only the arrows.
| Included file | Purpose / location |
|---|---|
| TRI_Range_Zone_Bars.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'.
This product does not require DLL permission or enabling automated trading. When removed, this product's drawings are cleared.
There are 7 inputs. Change them on the Inputs tab of the properties. The English display name and the input name in the code are shown together.
InpZonePercentInpRangeFactorInpADXPeriodInpShowBarsInpShowSwitchInpClosedBarsOnlyInpArrowGapThe bars change with the close and the high-low range. With Closed Bars Only=false, the arrows can also change while the bar is forming.
With ADX period n, classification starts at the earliest from bar 2n+2. If R bars are not available at that bar, the display is delayed further.
Range Bars is the bar count derived from the previous ADX, and ADX is the value for that bar. Do not apply the same point-in-time formula to both.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
This product shows calculation results through plot buffers and does not place trade orders. It does not guarantee profit or future price movement.
A small ADX makes the required range longer. Check the history, Show Bars and Show Switch.
By default, arrows are on closed bars only. No arrow appears when returning from the middle to the same side, or for the first state.
An input outside the allowed range is refused at startup. Check the English reason shown on the Experts tab of the Toolbox, not an explanation on the chart, and confirm by returning to the default values.
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.
HH=max(H[i−R+1..i]), LL=min(L[i−R+1..i]), w=(HH−LL)×Zone Percent/100. C>HH−w is the upper side, C<LL+w is the lower side, and anything else is the middle.
An Exponential type that exponentially smooths the ratio of price differences and direction. It is treated separately from the Wilder type. Values have been cross-checked against the MT5 standard ADX with periods 14, 250 and 1.
Only values up to that bar are used. It is recalculated when history is added or corrected, or settings are changed. This does not guarantee that values never change.