Home Technical Indicator Post

Mastering the Highest Lowest Indicator for MetaTrader 5

Attachments
20300.zip (1.39 KB, Download 0 times)

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:

Highest Lowest

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:

Highest Lowest The bar can be redrawn

Fig. 2. The Bar Can Be Redrawn

In contrast, this bar will remain unchanged:

Highest Lowest The bar can not be redrawn

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

Comments (0)