If you're using the bar function, then you have no 5 minutes bars. With 5 minutes bars, you can get a daily timeframe simply with TimeFrame = framesync(1440/5). With bars of varying length, you must synchronize the time frame to one day as decribed in the manual.