Maybe BarOffset could help you, but I think it changes the D1 bars completely. You could go to a lower bar period and use Timeframe

The most robust implementation I found is

Code
TimeFrame = frameSync(1440 / BarPeriod);

//do your D1 stuff here, like
//PricesD1 = series(priceOpen());

TimeFrame = 1;

//make your trades here