Get previous day Low and High price in mql4

 

Hi everyone

I'm new to mql4 and I tried someway to get high and low price but I couldn't make it.

I want to get previous high and low between datetime '2022-09-01 : 18:00' to '2022-09-02 : 18:00' , then I will check every tick between '2022-09-02 : 18:00' to '2022-09-03 : 18:00' to check if my condition is true or not.

when it goes to next day I need to calculate high/low again base on '2022-09-02 : 18:00' to '2022-09-03 : 18:00' and use them for next day.


how can I do it ?


 
  1. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place. The moderators will likely move this thread there soon.

  2. Aref Rafei: I want to get previous high and low between datetime '2022-09-01 : 18:00' to '2022-09-02 : 18:00' , then I will check every tick between '2022-09-02 : 18:00' to '2022-09-03 : 18:00' to check if my condition is true or not.

    The first is easy. Get the start and end bar indexes with iBarShift, and then use iHighest.

  3. The second can not be done. There are no saved ticks.