Help me please open price with moving date

 

Hi everybody,

I'm very new in MQL4 and I would like to know how I can program this;

I want to have an open price Period 1H at each 6h time
Ex: Date 7/april/2007 time 6h am eurusd 1.3334
Date 8/april/2007 time 6h am eurusd 1.3440

I don't know how to update my datetime so when it's give me my open price at Date 7/april/2007 how I can add one day automatic to my date so it's will give me my next open price the day after...


I know I have to use iBarShift but I don't know what to do next...

Thanks