Then the only way to do it is have your formula always look at completed bars. ,1]
If your formula is based on D interval, then yes you need the 5-min inter-bar testing. Otherwise it will look at yesterday's data every 5 minutes today, which will never change, because yesterday is fixed. You'll just have to try it.