Bar Range Average
Averages the difference between the high and low of 1 candle over the specified number of bars and shows it in a subwindow. The averaging method can be chosen from 4 options. Price gaps from the previous bar are not included.
Range of 1 bar → average with the chosen method → range level
Large valueThe range per 1 bar is wide. It shows how much the price moved within 1 bar.
Small valueThe range per 1 bar is narrow. It does not show which way the price will move next.
The shape changes with the averaging methodEven with the same number of bars, the speed of response differs among simple, exponential, smoothed and linear weighted averages.
MT5 display and examples of changed settings
Only the price chart and this product are shown. Compare the default settings and the example of changed settings with the same symbol, timeframe and display range.
View the screen in detail at full size
View the screen in detail at full size
Example shown: synthetic data, 1-minute timeframe (M1). This is not the price movement of an actual symbol. The changed settings are an example to show the difference, not recommended values. You can enlarge it from "View the screen at full size".
How to read it in 30 seconds
What it measures
Averages the range of 1 bar with 4 methods
It takes the difference between each bar's high and low as "the range of 1 bar" and averages it over the specified number of bars. The difference from the previous bar's close (the price gap) is not included, so the values do not match those of indicators that measure the range including price gaps. There are 4 averaging methods: simple, exponential, smoothed and linear weighted. The exponential and smoothed averages carry over past values, so they respond more slowly; the linear weighted average gives more weight to newer bars, so it responds faster.
Large value
The range per 1 bar is wide. It shows how much the price moved within 1 bar.
Values are small
The range per 1 bar is narrow. It does not show which way the price will move next.
The shape changes with the averaging method
Even with the same number of bars, the speed of response differs among simple, exponential, smoothed and linear weighted averages.
When to use it in decisions
Read in the order "indicator → confirm with price → consider → conditions that do not apply". This is not a trading instruction; it is a way to organize the material for your decisions.
The level has risen
- Indicator
- The range per 1 bar is widening.
- Price
- Check whether the swing of the price's highs and lows is widening.
- Consideration
- Cross-check against the price evidence and your trading plan made in advance.
- Exclusion condition
- Do not decide the direction from a widening range alone. It does not include whether the price is going up or down.
The level has come down
- Indicator
- The range per 1 bar is narrowing.
- Price
- Check whether the price is staying within a narrow band.
- Consideration
- Cross-check against the price evidence and your trading plan made in advance.
- Exclusion condition
- Do not use a narrow range as a reason to believe the price will not move in the future.
The level suddenly jumped up
- Indicator
- A bar with a large range may have entered just before.
- Price
- Check whether that 1 bar stands out.
- Consideration
- Cross-check against the price evidence and your trading plan made in advance.
- Exclusion condition
- Do not decide that a jump of 1 bar is a change in the trend.
The shape changed after changing the averaging method
- Indicator
- Only the speed of response has changed; the underlying ranges themselves are the same.
- Price
- Confirm that the price movement itself has not changed in the same situation.
- Consideration
- Cross-check against the price evidence and your trading plan made in advance.
- Exclusion condition
- Do not treat the difference between methods as a comparison of which one is correct.
Actual decision steps
Choose the symbol and timeframe
Choose the symbol and timeframe, and confirm that at least as many bars of history as the number of bars to average are displayed.
Read the position relative to the reference
Read the level and how it changes. Changing the averaging method changes the speed of response.
Cross-check against the price evidence
Check the same situation on the price chart as well, and compare it with the length of the bars.
Decide how to treat the current bar
On the current bar, the value moves as the high and low update. Decide in advance whether to judge only on closed bars or to wait for the bar to close.
What to decide before entering
This product does not place or close orders. If you trade, decide your reasons, acceptable loss and exit conditions separately, and do not leave them to the indicator alone.
What to check while holding a position
Give priority to your plan made in advance and to the price movement. Do not postpone a stop-loss or exit just because the indicator moves up or down.
Installation and checking the package contents
| Included file | Location and purpose |
|---|---|
| TRI_Bar_Range_Average.ex5 | The indicator itself for MetaTrader 5. Place it in MQL5/Indicators. |
| TRI_Bar_Range_Average_Manual.html | The manual for this product. Open it in a browser. |
Extract the ZIP first. MT5 only. This product does not require placing a license file or account authentication. Use the files without renaming them.
Open the data folder
In MT5, select "File → Open Data Folder".
Place the indicator file
Place the included TRI_Bar_Range_Average.ex5 in MQL5/Indicators.
Place it on a chart
Refresh the Navigator or restart MT5, and apply this product to a chart of the symbol and timeframe you want.
Check the settings and display
Check with the default settings first. To change them, open this product's properties from the Indicators List. For the required number of history bars and where it is displayed, see Chapters 7 and 8.
To remove it, select this product in the chart's Indicators List and delete it.
Settings
There are 2 calculation inputs. Open the properties from the Indicators List and change them there.
Number of bars to average
- Input name
- InpPeriod
- Default
- 10
- Allowed range
- An integer from 2 to 10000. Out of range, the indicator cannot be applied.
- Description
- Specifies how many bars' ranges to average. A larger value makes the line smoother.
Averaging methods
- Input name
- InpMethod
- Default
- SMA (simple)
- Allowed range
- Choose from 4: SMA / EMA / SMMA / LWMA.
- Description
- SMA is the simple average, EMA the exponential average, SMMA the smoothed average and LWMA the linear weighted average. LWMA responds the fastest and SMMA the slowest.
Line color and width
- Default
- Orange (DarkOrange) solid line, width 2. Only 1 line is shown in a subwindow.
- Where to change
- You can adjust it on the Colors tab of the properties.
- How to read
- Read the level and how it changes. It never falls below 0.
Usage specifications
Where the display starts
Display starts from the bar after 1 fewer bars than the averaging count have passed. With the default of 10, the first displayed bar is the 10th bar counted from the oldest bar. All 4 methods start from the same position.
Gaps are not included
The difference from the previous bar's close is not included in the calculation. The values do not match indicators that measure a range including gaps.
Unit
Same unit as the price. For a currency pair quoted with 5 digits, 0.00010 corresponds to 1.0 pips. The unit changes with the symbol.
Value range
Because the high is greater than or equal to the low, the value is never negative.
Handling of the current bar
The current bar is recalculated each time the high or low is updated. When the bar closes, its value is also fixed.
Additions and corrections to history
If the data provider adds or corrects past bars, recalculation runs from that range.
When removing
Select this product in the Indicators List and delete it. This product has no recovery procedure using a license file.
Troubleshooting and usage notes
The line is not displayed
The number of bars displayed may be smaller than the number of bars to average. Make the number smaller, or load the history and then check.
Changing the averaging method does not change much
With a small number of bars, the differences among the 4 methods are small. A larger number of bars makes the differences appear.
The values differ from other range indicators
This product does not include price gaps. Compared with indicators that include gaps, the values diverge around bars where a gap occurred.
The display does not change after changing the settings
If the number of bars is outside the allowed range (integers from 2 to 10000), or the averaging method is not one of the 4, this product is not applied.
The level changed after changing the timeframe
When the length of 1 bar changes, the range also changes. The level also changes.
Notes on use
- The indicator is information calculated from past and current prices. It does not guarantee profit, the future direction or the success of a trade.
- It does not place orders, close positions, send alerts or send email.
- Changing the settings, symbol or timeframe also changes the values. Distinguish changes in the current bar from recalculation caused by added or corrected history.
Technical information and specification details
Calculation approach and display specifications
It finds the difference between the high and low 1 bar at a time and smooths it with one of the simple, exponential, smoothed or linear weighted averages. The exponential and smoothed averages use the simple average of the first set of bars as their initial value. It uses 1 buffer for drawing and 1 internal buffer for calculation. It does not use other indicators, external libraries, communication or order functions.
| Item | Content |
|---|---|
| Version | 1.00 |
| Platform | MetaTrader 5 |
| Display | 1 orange line in a subwindow |
| Unit | Same units as the price (range) |
| Copyright notice | Trilogy Inc. |
Status of the general reading
The situations and steps on this page are examples of linking calculated values to observation of the price. They do not guarantee the future direction, full compatibility, non-repainting or a light calculation load.