The Highest Lowest indicator is a powerful tool for traders using MetaTrader 5. This nifty indicator identifies bars that have a High surpassing the High of the bars on both sides, as well as those with a Low dipping below the Low of the adjacent bars:

Fig. 1. Highest Lowest Indicator
This indicator utilizes the DRAW_ARROW style to display its signals.
One thing to keep in mind is that because the indicator assesses the bar on the right, its value may occasionally change. For instance, take a look at the example below where the bar can be redrawn:

Fig. 2. The Bar Can Be Redrawn
In contrast, this bar will remain unchanged:

Fig. 3. The Bar Cannot Be Redrawn
If you're keen to view the default indexing of bars in your indicators, simply uncomment the code in the OnCalculate function:
/*
int bar_0=0;
int bar_rates_total_minus_1=rates_total-1;
Comment("prev_calculated=",prev_calculated,"\n",
"time[",bar_0,"]=",time[bar_0],"\n",
"time[",bar_rates_total_minus_1,"]=",time[bar_rates_total_minus_1]);
*/
This snippet will show you the value of the prev_calculated variable, along with the time of the bar with the 0 index and the time for the bar at the index of rates_total-1.
Related Posts
- Unlocking MetaCOT 2: Your Ultimate CFTC Indicator Toolkit for MT4
- Unlocking the Power of Master Tools for MetaTrader 4
- Mastering the Fibonacci ZigZag Indicator for MetaTrader 5
- Unlock Trading Insights with Volume Profile + Range v6.0 for MetaTrader 5
- Mastering the Open Range Breakout Indicator for MetaTrader 5