Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

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

author EAcpu | 2 reads | 0 comments |

Highest Lowest - indicator for MetaTrader 5

Highest Lowest - indicator for MetaTrader 5

Highest Lowest - indicator for MetaTrader 5

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:

Highest Lowest - indicator for MetaTrader 5

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:

Highest Lowest - indicator for MetaTrader 5

Figure 2. Highest and lowest bars can be redrawn

The bar will not be redrawn:

Highest Lowest - indicator for MetaTrader 5

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

Verification code Refresh