Thx for your answer, I see, no problem I will find a way to customize it, however I noticed that using the code above I get hourly Bars constructed using for instance minutes Bars from 00:01 to 01:00 for the 1H Bar with date 01:00, is there a simple way of getting instead a 1H Bar with a date 1:00 but constructed from 1M Bars from 00:00 to 00:59 as if BarPeriod=60 and TimeFrame=0 ? Do I have to apply some sort of offset ?