DinexSpace New High and New Low Count
- Indicateurs
- Version: 1.0
DinexSpace New High and New Low Count is an indicator for MetaTrader 5 (MT5) that shows how often the close made a new high or a new low lately. Among the last N closed bars it counts the bars whose close was above all of the M closes before them (a new high) and the bars whose close was below all of them (a new low), and shows each count in percent of N. It describes the past; it does not forecast.
The rule
- A close is a new high when it is higher than every close of the M bars before it, and a new low when it is lower than every one of them.
- For each closed bar, count the new highs and the new lows among the last N bars.
- The two lines are these counts in percent of N. The panel shows the counts and the percent.
What you get
- Two lines in their own window: green for new highs and red for new lows.
- Panel on the chart: the counts and the percent of new highs and new lows. You can turn it off or move it to any corner.
- Two settings: the window N you count over and the lookback M you compare against.
- Closed bars only, on any symbol and any timeframe. The number of bars calculated is an input.
How to use it
- Copy DinexNewHighLowCount.ex5 to MQL5\Indicators, or find it in the Navigator under Indicators > Market.
- Drag it onto a chart and choose the window and the lookback.
- Read the lines and the panel.
Checked
A test Expert Advisor reads the four indicator buffers on every new bar in the Strategy Tester and compares each value with a separate count over the close prices, on EURUSD H1 and GBPUSD M15 and with different windows and lookbacks. It also checks that the value of a bar does not change when later bars arrive. It prints the number of checks and the number of failed checks.
Notes
- A close that is only equal to the highest (or lowest) close of the lookback is not a new high (or a new low).
- The window and the lookback are numbers of bars of the chart you attach it to.
- The indicator describes what has already happened. It gives no entries or exits and does not predict any move.
Requirements
- MetaTrader 5, any symbol and timeframe.
