How to display a correct day bar

Hello,All

In Hong Kong, the correct trading time is 0900-1200, 1300-1630, and 1715-0100. There are totally three sessions for one day. The daily bar needs to carry over to next day. It was wrong for day bar. Can anyone help for me??

See this: http://www.amibroker.com/kb/2006/03/19/how-does-the-daily-time-compression-work/