How to get date of period separator?

 
How to get date of period separator?

I have a hard time to get 1 day or I mean 5 days of data in 4hrs timeframe. In 1min to 1hr timeframe I can easily get the 1 day of candles if I compare the current date to previous date but the problem in 4hr timeframe have 5 days of candles, sometimes 4 days of candles. I think the easy solution to get the date of period separator then compare it to current date?? I'm looking if there's an easy way, or other better solution, and don't complicate things on my custom indicator code.
 
  1. Don't triple post! You already had A) Why Period Separator in 4-hr chart include 5 days of candles? and B) How do you get "Date" of specific candle?
              General rules and best pratices of the Forum. - General - MQL5 programming forum
  2. There is no "easy solution to get the date of period separator." If you're below H4 get the beginning of the day. On the H4 get the start of the week. On the WK get the start of the month, on the MN get the start of the year.
    1. I already gave you a link for the first.
    2. For the others requires higher timeframes, you must handle 4066/4073 errors.
                Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
 
whroeder1:
  1. Don't triple post! You already had A) Why Period Separator in 4-hr chart include 5 days of candles? and B) How do you get "Date" of specific candle?
              General rules and best pratices of the Forum. - General - MQL5 programming forum
  2. There is no "easy solution to get the date of period separator." If you're below H4 get the beginning of the day. On the H4 get the start of the week. On the WK get the start of the month, on the MN get the start of the year.
    1. I already gave you a link for the first.
    2. For the others requires higher timeframes, you must handle 4066/4073 errors.
                Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forumIt's It's It's 
 It's very different on my previous post. Date of candles and date of period separator are not same.