is(NEWDAY) will tell you when you have a new day. Pause sending trading signals until enough bars have passed. Voila, you have enough lookback for the day.