Highest Low - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources - MetaTrader 5 Resources



This High and Low indicator searches for bars with highs higher than the highs of the left and right bars, and bars with lows lower than the lows of the left and right bars:

Figure 1. Highest and lowest
This indicator displays the drawn arrow style using the following method.
Since the indicator analyzes the right bar, the value of the indicator may change in some cases. For example, the following bars can be redrawn:

Figure 2. Highest and lowest bars can be redrawn
The bar will not be redrawn:

Figure 3. The highest and lowest bars cannot be redrawn
If you want to see the default index of bars in the indicator, uncomment the code in OnCalculate:
/*
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 code displays on the screen the previously calculated variable, the time of the bar with index 0 , and the time of the bar with index rates_total-1 .
Attachment download
📎 highest_lowest.mq5 (7.47 KB)
Source: MQL5 #20300
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •