DinexSpace Bars Since Highest High and Lowest Low
- Göstergeler
- Sürüm: 1.0
DinexSpace Bars Since N-Bar High and Low is an indicator for MetaTrader 5 (MT5) that shows how many closed bars ago the highest high and the lowest low of the last N bars were made. 0 means the bar itself made the high (or the low) of its window; 10 means it was ten bars ago. It describes the past; it does not forecast.
The rule
- For each closed bar, look at the last N bars, the bar itself included.
- The green line is the number of bars since the highest high of the window; the red line is the number of bars since the lowest low. If two bars share the same high, the more recent one counts.
- A line falls to 0 when a bar makes a new high (or low) of its window.
What you get
- Two lines in their own window: green for the high, red for the low, with a dotted line at the middle of the window.
- Percent option: show the age as a share of the window, from 0 to 100 percent, to compare windows of different sizes.
- Panel on the chart: the age of the high and of the low and which one is nearer. You can turn it off or move it to any corner.
- Closed bars only, on any symbol and any timeframe. The number of bars calculated is an input.
How to use it
- Copy DinexBarsSinceHighLow.ex5 to MQL5\Indicators, or find it in the Navigator under Indicators > Market.
- Drag it onto a chart and choose the window.
- Read the lines and the panel.
Checked
A test Expert Advisor reads the two indicator lines on every new bar in the Strategy Tester and compares each value with the built-in iHighest and iLowest functions and with a separate scan of the prices, on EURUSD H1 and GBPUSD M15 and with different windows and with the percent option on and off. It prints the number of checks and the number of failed checks.
Notes
- The comparison uses the high and low prices of the bars; there is no threshold in points.
- The indicator counts what has already happened. It gives no entries or exits and does not predict any move.
Requirements
- MetaTrader 5, any symbol and timeframe.
