There are many processes by which have been formed even if same size.
So in this script, daily is overlapped on the currently chart as default, and that can be changed.
Only real body is shown so as not to interfere with the currently chart.
sec_open = security(syminfo.tickerid, res, high, lookahead=barmerge.lookahead_on)
sec_close = security(syminfo.tickerid, res, low, lookahead=barmerge.lookahead_on)
You would still need open/close for the BullishColor/BearishColor rules, and using high/low only might affect real-time painting, so it might not be ideal. Hope this is helpful for you