How can I check if candle highs and lows are the same within multiple timeframes using MQL5

 

consecutive candles high and low



From the image, I’ve marked the high of candle index (i) and low of candle index (i + 1). These candles are on the H1 chart.


How can I search multiple lower timeframes within the two H1 candles to determine if there are similar consecutive candles that have the same price for the high and low as in H1?


I believe I should be using iBarShift or something similar to make this search, but I am not sure how to get this done. 

 
Hi you can have a look here.
Documentation on MQL5: Timeseries and Indicators Access / iHigh
Documentation on MQL5: Timeseries and Indicators Access / iHigh
  • www.mql5.com
The High price of the bar (indicated by the 'shift' parameter) on the corresponding chart or 0 in case of an error. For error details, call the GetLastError() function. The function always returns actual data. For this purpose it performs a request to the timeseries for the specified symbol/period during each call. This means that if there is...
 
And also here.
MQL5 Programming Basics: Time
MQL5 Programming Basics: Time
  • www.mql5.com
MQL5 offers a number of simple functions for working with time and you should not find it difficult getting familiar with them. The range of tasks that require use of date and time is quite small. The main tasks are: To perform certain actions at a given point of time (Fig. 1). These may be actions performed at the same time each day or at a...
Reason: